modified listwgt
This commit is contained in:
parent
dc83646fab
commit
1eb367d265
@ -107,6 +107,25 @@ void TargetListWgt::updateParseFile(const QString & strFile, int nT, QVariantLis
|
|||||||
double t = listLine.at(nT).toDouble();
|
double t = listLine.at(nT).toDouble();
|
||||||
|
|
||||||
QMap<int, QVariantList> mapData;
|
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++)
|
for (int nI = 0; nI < listCurve.size(); nI++)
|
||||||
{
|
{
|
||||||
QVariantMap mapCurve = listCurve.at(nI).toMap();
|
QVariantMap mapCurve = listCurve.at(nI).toMap();
|
||||||
@ -122,6 +141,8 @@ void TargetListWgt::updateParseFile(const QString & strFile, int nT, QVariantLis
|
|||||||
}
|
}
|
||||||
mapData.insert(nI, varList);
|
mapData.insert(nI, varList);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
m_dataTable.insert(t, mapData);
|
m_dataTable.insert(t, mapData);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user