|
|
|
@ -83,7 +83,7 @@ SmokeBoxIdentification::SmokeBoxIdentification(QWidget *parent)
|
|
|
|
|
|
|
|
|
|
|
|
SmokeBoxIdentification::~SmokeBoxIdentification()
|
|
|
|
SmokeBoxIdentification::~SmokeBoxIdentification()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
emit sgControlSideLight(lightCtrl::emTurnOffLight);
|
|
|
|
//emit sgControlSideLight(lightCtrl::emTurnOffLight);
|
|
|
|
DELETE_POINTER(m_pCategoryMatcher);
|
|
|
|
DELETE_POINTER(m_pCategoryMatcher);
|
|
|
|
DELETE_POINTER(m_pNetControl);
|
|
|
|
DELETE_POINTER(m_pNetControl);
|
|
|
|
if (m_pTcpClientThread)
|
|
|
|
if (m_pTcpClientThread)
|
|
|
|
@ -505,7 +505,10 @@ bool SmokeBoxIdentification::decodeSmokeInfoCsv(const QString& filePath)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
QString smokeCode = wsheet->read(i, colStart).toString();
|
|
|
|
QString smokeCode = wsheet->read(i, colStart).toString();
|
|
|
|
QString smokeName = wsheet->read(i, colStart + 1).toString();
|
|
|
|
QString smokeName = wsheet->read(i, colStart + 1).toString();
|
|
|
|
|
|
|
|
if (smokeCode.isEmpty() || smokeName.isEmpty())
|
|
|
|
|
|
|
|
continue;
|
|
|
|
m_mapSmokeCode2Name.insert(smokeCode, smokeName);
|
|
|
|
m_mapSmokeCode2Name.insert(smokeCode, smokeName);
|
|
|
|
|
|
|
|
//qDebug() << "insert: " << smokeCode << " and " << smokeName;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
qDebug() << "Decode smokeInfo from " << filePath << " successed";
|
|
|
|
qDebug() << "Decode smokeInfo from " << filePath << " successed";
|
|
|
|
return true;
|
|
|
|
return true;
|
|
|
|
@ -542,6 +545,8 @@ bool SmokeBoxIdentification::matchSmokeNameAndTemplateFolderName(const QString&
|
|
|
|
if (typeFolderName.contains(smokeCNName))
|
|
|
|
if (typeFolderName.contains(smokeCNName))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
m_mapSmokeName2TemplateFolderName.insert(smokeCNName, typeFolderName);
|
|
|
|
m_mapSmokeName2TemplateFolderName.insert(smokeCNName, typeFolderName);
|
|
|
|
|
|
|
|
//qDebug() << "find " << typeFolderName << " in excel";
|
|
|
|
|
|
|
|
//qDebug() << "insert " << smokeCNName << " and " << typeFolderName;
|
|
|
|
smokeCNNameList.removeAt(i);
|
|
|
|
smokeCNNameList.removeAt(i);
|
|
|
|
bFind = true;
|
|
|
|
bFind = true;
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
@ -549,7 +554,7 @@ bool SmokeBoxIdentification::matchSmokeNameAndTemplateFolderName(const QString&
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (!bFind)
|
|
|
|
if (!bFind)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
qDebug() << "Not find: " << typeFolderName << "in excel";
|
|
|
|
qDebug() << "Not find: " << typeFolderName << " in excel";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
qDebug() << "match smokeName and templateFolderName successed";
|
|
|
|
qDebug() << "match smokeName and templateFolderName successed";
|
|
|
|
|