|
@@ -13,6 +13,9 @@ BondMatrixProgramPage::BondMatrixProgramPage(QWidget* parent) :
|
|
|
|
|
|
ui.pushButtonSave->setProperty("type", "save");
|
|
|
ui.pushButtonAddOutMatrix->setProperty("type", "addOutMatrix");
|
|
|
+ ui.pushButtonSaveParaAs->setProperty("type", "saveParaAs");
|
|
|
+ ui.pushButtonSavePara->setProperty("type", "savePara");
|
|
|
+
|
|
|
setStyleSheet(
|
|
|
"QWidget { background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #F1F4FD, stop: 1 #E5E4F6); }"
|
|
|
"QDoubleSpinBox { background: #FFFFFF; border: 1px solid #BABBDC; border-radius: 6px; padding: 2px 5px; }"
|
|
@@ -42,10 +45,17 @@ BondMatrixProgramPage::BondMatrixProgramPage(QWidget* parent) :
|
|
|
|
|
|
//ui.tab->setStyleSheet("background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #F1F4FD, stop: 1 #E5E4F6)");
|
|
|
|
|
|
+ //从后端获取数据
|
|
|
+ m_vectBondMatrixs = m_manageDB->GetCProduct()->GetBondMatrix();
|
|
|
+ m_manageDB->GetCProduct()->GetAllPointMatrix(m_vecSubMatrixs);
|
|
|
+ m_vecBondInfoData = m_manageDB->GetCProduct()->GetAllBondInfoData();
|
|
|
+ if (m_vectBondMatrixs.size() == 0)
|
|
|
+ {
|
|
|
+ return;
|
|
|
+ }
|
|
|
initPage();
|
|
|
|
|
|
connect(ui.pushButtonSave, &QPushButton::clicked, this, [=] {
|
|
|
- ParamChangeEvent();
|
|
|
MatrixChangeEvent();
|
|
|
});
|
|
|
|
|
@@ -56,30 +66,49 @@ BondMatrixProgramPage::BondMatrixProgramPage(QWidget* parent) :
|
|
|
[](const PROGRAM_BOND_MATRIX_STRUCT& a, const PROGRAM_BOND_MATRIX_STRUCT& b) {
|
|
|
return a.BondMatrixId < b.BondMatrixId;
|
|
|
});
|
|
|
- //找Id
|
|
|
- int newId = 1;
|
|
|
- for (const auto& matrix : m_vectBondMatrixs)
|
|
|
+
|
|
|
+ int newBondMatrixID = 0;
|
|
|
+ UINT maxID = 0;
|
|
|
+ // 查找最大 MatrixId
|
|
|
+ for (PROGRAM_BOND_MATRIX_STRUCT& bondMatrix : m_vectBondMatrixs)
|
|
|
{
|
|
|
- if (matrix.BondMatrixId == newId)
|
|
|
+ if (bondMatrix.BondMatrixId > maxID)
|
|
|
{
|
|
|
- newId++;
|
|
|
- }
|
|
|
- else if (matrix.BondMatrixId > newId)
|
|
|
- {
|
|
|
- break;
|
|
|
+ maxID = bondMatrix.BondMatrixId;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- newMatrix.BondMatrixId = newId;
|
|
|
+ newBondMatrixID = ++maxID;
|
|
|
+ while (std::any_of(m_vectBondMatrixs.begin(), m_vectBondMatrixs.end(),
|
|
|
+ [newBondMatrixID](const PROGRAM_BOND_MATRIX_STRUCT& bondMatrix) {
|
|
|
+ return bondMatrix.BondMatrixId == newBondMatrixID;
|
|
|
+ }))
|
|
|
+ {
|
|
|
+ newBondMatrixID++; // 如果生成的 ID 已经存在,递增直到找到唯一的 ID
|
|
|
+ }
|
|
|
+
|
|
|
+ newMatrix.BondMatrixId = newBondMatrixID;
|
|
|
newMatrix.BondMatrixRow = 0;
|
|
|
newMatrix.BondMatrixCol = 0;
|
|
|
+ newMatrix.strModuleName = "UltraHead";
|
|
|
+ newMatrix.iModuleId = MODULE_LIST::BondHead;
|
|
|
int newVectorIndex = m_vectBondMatrixs.size();
|
|
|
- std::vector<PROGRAM_POINT_MATRIX_STRUCT> newVecSubMatrix;
|
|
|
+
|
|
|
+
|
|
|
+ newMatrix.BondInfoId = 1;
|
|
|
+ //std::vector<PROGRAM_POINT_MATRIX_STRUCT> newVecSubMatrix;
|
|
|
m_vectBondMatrixs.push_back(newMatrix);
|
|
|
- AddOutMatrixPage(newVectorIndex, newMatrix, newVecSubMatrix);
|
|
|
+ AddOutMatrixPage(newVectorIndex, newMatrix, m_vecSubMatrixs);
|
|
|
|
|
|
});
|
|
|
|
|
|
+ connect(ui.pushButtonSavePara, &QPushButton::clicked, this, [=] {
|
|
|
+ MatrixChangeEvent();
|
|
|
+ ParamChangeEvent();
|
|
|
+ });
|
|
|
+ connect(ui.pushButtonSaveParaAs, &QPushButton::clicked, this, [=] {
|
|
|
+ ParamSaveAsEvent();
|
|
|
+ });
|
|
|
//参数
|
|
|
connect(ui.comboBoxDieSource, QOverload<int>::of(&QComboBox::currentIndexChanged), this, [=](int index) {
|
|
|
if (index == 0)
|
|
@@ -90,7 +119,7 @@ BondMatrixProgramPage::BondMatrixProgramPage(QWidget* parent) :
|
|
|
{
|
|
|
m_curBondInfo.eDieSource = DIE_SOURCE::BY_WAFER;
|
|
|
}
|
|
|
- ParamChangeEvent();
|
|
|
+ //ParamChangeEvent();
|
|
|
});
|
|
|
|
|
|
connect(ui.checkBoxIsCalib, &QCheckBox::clicked, this, [=](bool isChecked) {
|
|
@@ -99,58 +128,58 @@ BondMatrixProgramPage::BondMatrixProgramPage(QWidget* parent) :
|
|
|
|
|
|
connect(ui.spinBoxPickTempID, &SpinBox::editDone, this, [=]() {
|
|
|
m_curBondInfo.iPickPRStrategyId = ui.spinBoxPickTempID->value();
|
|
|
- ParamChangeEvent();
|
|
|
+ //ParamChangeEvent();
|
|
|
});
|
|
|
|
|
|
connect(ui.spinBoxPickNozzleID, &SpinBox::editDone, this, [=]() {
|
|
|
m_curBondInfo.iPickHeadId = ui.spinBoxPickNozzleID->value();
|
|
|
- ParamChangeEvent();
|
|
|
+ //ParamChangeEvent();
|
|
|
});
|
|
|
|
|
|
connect(ui.spinBoxPreBondTemp, &SpinBox::editDone, this, [=]() {
|
|
|
m_curBondInfo.iBondFrontPRStrategyId = ui.spinBoxPreBondTemp->value();
|
|
|
- ParamChangeEvent();
|
|
|
+ //ParamChangeEvent();
|
|
|
});
|
|
|
|
|
|
connect(ui.spinBoxPostBondTemp, &SpinBox::editDone, this, [=]() {
|
|
|
m_curBondInfo.iBondBackPRStrategyId = ui.spinBoxPostBondTemp->value();
|
|
|
- ParamChangeEvent();
|
|
|
+ //ParamChangeEvent();
|
|
|
});
|
|
|
|
|
|
connect(ui.spinBoxBondTemp, &SpinBox::editDone, this, [=]() {
|
|
|
m_curBondInfo.iBondPRStrategyId = ui.spinBoxBondTemp->value();
|
|
|
- ParamChangeEvent();
|
|
|
+ //ParamChangeEvent();
|
|
|
});
|
|
|
|
|
|
connect(ui.spinBoxLookUpTemp, &SpinBox::editDone, this, [=]() {
|
|
|
m_curBondInfo.iLookUpPRStrategyId = ui.spinBoxLookUpTemp->value();
|
|
|
- ParamChangeEvent();
|
|
|
+ //ParamChangeEvent();
|
|
|
});
|
|
|
|
|
|
connect(ui.spinBoxCalibPickTemp, &SpinBox::editDone, this, [=]() {
|
|
|
m_curBondInfo.iCalibPRStrategyId = ui.spinBoxCalibPickTemp->value();
|
|
|
- ParamChangeEvent();
|
|
|
+ //ParamChangeEvent();
|
|
|
});
|
|
|
|
|
|
connect(ui.spinBoxBondNozzleID, &SpinBox::editDone, this, [=]() {
|
|
|
m_curBondInfo.iBondHeadId = ui.spinBoxBondNozzleID->value();
|
|
|
- ParamChangeEvent();
|
|
|
+ //ParamChangeEvent();
|
|
|
});
|
|
|
connect(ui.doubleSpinBoxBondOffsetX, &DoubleSpinBox::editDone, this, [=]() {
|
|
|
m_curBondInfo.stOffset.x = ui.doubleSpinBoxBondOffsetX->value();
|
|
|
- ParamChangeEvent();
|
|
|
+ //ParamChangeEvent();
|
|
|
});
|
|
|
connect(ui.doubleSpinBoxBondOffsetY, &DoubleSpinBox::editDone, this, [=]() {
|
|
|
m_curBondInfo.stOffset.y = ui.doubleSpinBoxBondOffsetY->value();
|
|
|
- ParamChangeEvent();
|
|
|
+ //ParamChangeEvent();
|
|
|
});
|
|
|
connect(ui.doubleSpinBoxBondOffsetAngle, &DoubleSpinBox::editDone, this, [=]() {
|
|
|
m_curBondInfo.stOffset.a = ui.doubleSpinBoxBondOffsetAngle->value();
|
|
|
- ParamChangeEvent();
|
|
|
+ //ParamChangeEvent();
|
|
|
});
|
|
|
|
|
|
connect(ui.comboBoxPickParamType, &QComboBox::currentTextChanged, this, [=]() {
|
|
|
- UpdatePagePickParam();
|
|
|
+ //UpdatePagePickParam();
|
|
|
});
|
|
|
connect(ui.checkBoxPickBlockCheck, &QCheckBox::clicked, this, [=](bool isChecked) {
|
|
|
|
|
@@ -162,7 +191,7 @@ BondMatrixProgramPage::BondMatrixProgramPage(QWidget* parent) :
|
|
|
{
|
|
|
m_curCalibPickParam.bCheckBlock = ui.checkBoxPickBlockCheck->isChecked();
|
|
|
}
|
|
|
- ParamChangeEvent();
|
|
|
+ //ParamChangeEvent();
|
|
|
});
|
|
|
connect(ui.checkBoxPickLoseCheck, &QCheckBox::clicked, this, [=](bool isChecked) {
|
|
|
if (ui.comboBoxPickParamType->currentIndex() == 0)//华夫盒
|
|
@@ -173,7 +202,7 @@ BondMatrixProgramPage::BondMatrixProgramPage(QWidget* parent) :
|
|
|
{
|
|
|
m_curCalibPickParam.bCheckLose = ui.checkBoxPickLoseCheck->isChecked();
|
|
|
}
|
|
|
- ParamChangeEvent();
|
|
|
+ //ParamChangeEvent();
|
|
|
});
|
|
|
connect(ui.checkBoxPickFindForceCheck, &QCheckBox::clicked, this, [=](bool isChecked) {
|
|
|
if (ui.comboBoxPickParamType->currentIndex() == 0)//华夫盒
|
|
@@ -184,7 +213,7 @@ BondMatrixProgramPage::BondMatrixProgramPage(QWidget* parent) :
|
|
|
{
|
|
|
m_curCalibPickParam.bFindForce = ui.checkBoxPickFindForceCheck->isChecked();
|
|
|
}
|
|
|
- ParamChangeEvent();
|
|
|
+ //ParamChangeEvent();
|
|
|
});
|
|
|
connect(ui.doubleSpinBoxPrePickZ, &DoubleSpinBox::editDone, this, [=]() {
|
|
|
if (ui.comboBoxPickParamType->currentIndex() == 0)//华夫盒
|
|
@@ -195,7 +224,7 @@ BondMatrixProgramPage::BondMatrixProgramPage(QWidget* parent) :
|
|
|
{
|
|
|
m_curCalibPickParam.dPreLev = ui.doubleSpinBoxPrePickZ->value();
|
|
|
}
|
|
|
- ParamChangeEvent();
|
|
|
+ //ParamChangeEvent();
|
|
|
});
|
|
|
connect(ui.doubleSpinBoxPickForce, &DoubleSpinBox::editDone, this, [=]() {
|
|
|
if (ui.comboBoxPickParamType->currentIndex() == 0)//华夫盒
|
|
@@ -206,7 +235,7 @@ BondMatrixProgramPage::BondMatrixProgramPage(QWidget* parent) :
|
|
|
{
|
|
|
m_curCalibPickParam.dForce = ui.doubleSpinBoxPickForce->value();
|
|
|
}
|
|
|
- ParamChangeEvent();
|
|
|
+ //ParamChangeEvent();
|
|
|
});
|
|
|
connect(ui.doubleSpinBoxPickPosZ, &DoubleSpinBox::editDone, this, [=]() {
|
|
|
if (ui.comboBoxPickParamType->currentIndex() == 0)//华夫盒
|
|
@@ -217,7 +246,7 @@ BondMatrixProgramPage::BondMatrixProgramPage(QWidget* parent) :
|
|
|
{
|
|
|
m_curCalibPickParam.dWorkLev = ui.doubleSpinBoxPickPosZ->value();
|
|
|
}
|
|
|
- ParamChangeEvent();
|
|
|
+ //ParamChangeEvent();
|
|
|
});
|
|
|
connect(ui.spinBoxPickGrabDelay, &SpinBox::editDone, this, [=]() {
|
|
|
if (ui.comboBoxPickParamType->currentIndex() == 0)//华夫盒
|
|
@@ -228,7 +257,7 @@ BondMatrixProgramPage::BondMatrixProgramPage(QWidget* parent) :
|
|
|
{
|
|
|
m_curCalibPickParam.iGrabDelay = ui.spinBoxPickGrabDelay->value();
|
|
|
}
|
|
|
- ParamChangeEvent();
|
|
|
+ //ParamChangeEvent();
|
|
|
});
|
|
|
connect(ui.spinBox_PickDelay, &SpinBox::editDone, this, [=]() {
|
|
|
if (ui.comboBoxPickParamType->currentIndex() == 0)//华夫盒
|
|
@@ -239,7 +268,7 @@ BondMatrixProgramPage::BondMatrixProgramPage(QWidget* parent) :
|
|
|
{
|
|
|
m_curCalibPickParam.iPickOrBondDelay = ui.spinBox_PickDelay->value();
|
|
|
}
|
|
|
- ParamChangeEvent();
|
|
|
+ //ParamChangeEvent();
|
|
|
});
|
|
|
connect(ui.spinBoxPickBlockCheckDelay, &SpinBox::editDone, this, [=]() {
|
|
|
if (ui.comboBoxPickParamType->currentIndex() == 0)//华夫盒
|
|
@@ -250,7 +279,7 @@ BondMatrixProgramPage::BondMatrixProgramPage(QWidget* parent) :
|
|
|
{
|
|
|
m_curCalibPickParam.iBlockOrLoseDelay = ui.spinBoxPickBlockCheckDelay->value();
|
|
|
}
|
|
|
- ParamChangeEvent();
|
|
|
+ //ParamChangeEvent();
|
|
|
});
|
|
|
connect(ui.spinBoxPickVacDelay, &SpinBox::editDone, this, [=]() {
|
|
|
if (ui.comboBoxPickParamType->currentIndex() == 0)//华夫盒
|
|
@@ -261,7 +290,7 @@ BondMatrixProgramPage::BondMatrixProgramPage(QWidget* parent) :
|
|
|
{
|
|
|
m_curCalibPickParam.iVacuumDelay = ui.spinBoxPickVacDelay->value();
|
|
|
}
|
|
|
- ParamChangeEvent();
|
|
|
+ //ParamChangeEvent();
|
|
|
});
|
|
|
connect(ui.spinBoxPickBlowDelay, &SpinBox::editDone, this, [=]() {
|
|
|
if (ui.comboBoxPickParamType->currentIndex() == 0)//华夫盒
|
|
@@ -272,7 +301,7 @@ BondMatrixProgramPage::BondMatrixProgramPage(QWidget* parent) :
|
|
|
{
|
|
|
m_curCalibPickParam.iBlowDelay = ui.spinBoxPickBlowDelay->value();
|
|
|
}
|
|
|
- ParamChangeEvent();
|
|
|
+ //ParamChangeEvent();
|
|
|
});
|
|
|
|
|
|
|
|
@@ -288,7 +317,7 @@ BondMatrixProgramPage::BondMatrixProgramPage(QWidget* parent) :
|
|
|
{
|
|
|
m_curBondParam.bCheckBlock = ui.checkBoxBondBlockCheck->isChecked();
|
|
|
}
|
|
|
- ParamChangeEvent();
|
|
|
+ //ParamChangeEvent();
|
|
|
});
|
|
|
connect(ui.checkBoxBondLoseCheck, &QCheckBox::clicked, this, [=](bool isChecked) {
|
|
|
if (ui.comboBoxBondParamType->currentIndex() == 0)//中转台放晶
|
|
@@ -299,7 +328,7 @@ BondMatrixProgramPage::BondMatrixProgramPage(QWidget* parent) :
|
|
|
{
|
|
|
m_curBondParam.bCheckLose = ui.checkBoxBondLoseCheck->isChecked();
|
|
|
}
|
|
|
- ParamChangeEvent();
|
|
|
+ //ParamChangeEvent();
|
|
|
});
|
|
|
connect(ui.checkBoxBondFindForce, &QCheckBox::clicked, this, [=](bool isChecked) {
|
|
|
if (ui.comboBoxBondParamType->currentIndex() == 0)//中转台放晶
|
|
@@ -310,7 +339,7 @@ BondMatrixProgramPage::BondMatrixProgramPage(QWidget* parent) :
|
|
|
{
|
|
|
m_curBondParam.bFindForce = ui.checkBoxBondFindForce->isChecked();
|
|
|
}
|
|
|
- ParamChangeEvent();
|
|
|
+ //ParamChangeEvent();
|
|
|
});
|
|
|
connect(ui.doubleSpinBoxPreBondPosZ, &DoubleSpinBox::editDone, this, [=]() {
|
|
|
if (ui.comboBoxBondParamType->currentIndex() == 0)//中转台放晶
|
|
@@ -321,7 +350,7 @@ BondMatrixProgramPage::BondMatrixProgramPage(QWidget* parent) :
|
|
|
{
|
|
|
m_curBondParam.dPreLev = ui.doubleSpinBoxPreBondPosZ->value();
|
|
|
}
|
|
|
- ParamChangeEvent();
|
|
|
+ //ParamChangeEvent();
|
|
|
});
|
|
|
|
|
|
connect(ui.doubleSpinBoxBondForce, &DoubleSpinBox::editDone, this, [=]() {
|
|
@@ -333,7 +362,7 @@ BondMatrixProgramPage::BondMatrixProgramPage(QWidget* parent) :
|
|
|
{
|
|
|
m_curBondParam.dForce = ui.doubleSpinBoxBondForce->value();
|
|
|
}
|
|
|
- ParamChangeEvent();
|
|
|
+ //ParamChangeEvent();
|
|
|
});
|
|
|
|
|
|
connect(ui.doubleSpinBoxBondPosZ, &DoubleSpinBox::editDone, this, [=]() {
|
|
@@ -345,7 +374,7 @@ BondMatrixProgramPage::BondMatrixProgramPage(QWidget* parent) :
|
|
|
{
|
|
|
m_curBondParam.dWorkLev = ui.doubleSpinBoxBondPosZ->value();
|
|
|
}
|
|
|
- ParamChangeEvent();
|
|
|
+ //ParamChangeEvent();
|
|
|
});
|
|
|
connect(ui.spinBoxBondGrabDelay, &SpinBox::editDone, this, [=]() {
|
|
|
if (ui.comboBoxBondParamType->currentIndex() == 0)//中转台放晶
|
|
@@ -356,7 +385,7 @@ BondMatrixProgramPage::BondMatrixProgramPage(QWidget* parent) :
|
|
|
{
|
|
|
m_curBondParam.iGrabDelay = ui.spinBoxBondGrabDelay->value();
|
|
|
}
|
|
|
- ParamChangeEvent();
|
|
|
+ //ParamChangeEvent();
|
|
|
});
|
|
|
connect(ui.spinBoxBondBlockCheckDelay, &SpinBox::editDone, this, [=]() {
|
|
|
if (ui.comboBoxBondParamType->currentIndex() == 0)//中转台放晶
|
|
@@ -367,7 +396,7 @@ BondMatrixProgramPage::BondMatrixProgramPage(QWidget* parent) :
|
|
|
{
|
|
|
m_curBondParam.iBlockOrLoseDelay = ui.spinBoxBondBlockCheckDelay->value();
|
|
|
}
|
|
|
- ParamChangeEvent();
|
|
|
+ //ParamChangeEvent();
|
|
|
});
|
|
|
connect(ui.spinBoxBondDelay, &SpinBox::editDone, this, [=]() {
|
|
|
if (ui.comboBoxBondParamType->currentIndex() == 0)//中转台放晶
|
|
@@ -378,7 +407,7 @@ BondMatrixProgramPage::BondMatrixProgramPage(QWidget* parent) :
|
|
|
{
|
|
|
m_curBondParam.iPickOrBondDelay = ui.spinBoxBondDelay->value();
|
|
|
}
|
|
|
- ParamChangeEvent();
|
|
|
+ //ParamChangeEvent();
|
|
|
});
|
|
|
connect(ui.spinBoxBondVacDelay, &SpinBox::editDone, this, [=]() {
|
|
|
if (ui.comboBoxBondParamType->currentIndex() == 0)//中转台放晶
|
|
@@ -389,7 +418,7 @@ BondMatrixProgramPage::BondMatrixProgramPage(QWidget* parent) :
|
|
|
{
|
|
|
m_curBondParam.iVacuumDelay = ui.spinBoxBondVacDelay->value();
|
|
|
}
|
|
|
- ParamChangeEvent();
|
|
|
+ //ParamChangeEvent();
|
|
|
});
|
|
|
connect(ui.spinBoxBondBlowDelay, &SpinBox::editDone, this, [=]() {
|
|
|
if (ui.comboBoxBondParamType->currentIndex() == 0)//中转台放晶
|
|
@@ -400,7 +429,7 @@ BondMatrixProgramPage::BondMatrixProgramPage(QWidget* parent) :
|
|
|
{
|
|
|
m_curBondParam.iBlowDelay = ui.spinBoxBondBlowDelay->value();
|
|
|
}
|
|
|
- ParamChangeEvent();
|
|
|
+ //ParamChangeEvent();
|
|
|
});
|
|
|
}
|
|
|
|
|
@@ -498,31 +527,40 @@ void BondMatrixProgramPage::AddOutMatrixPage(int vectorIndex, PROGRAM_BOND_MATRI
|
|
|
[](const PROGRAM_POINT_MATRIX_STRUCT& a, const PROGRAM_POINT_MATRIX_STRUCT& b) {
|
|
|
return a.MatrixId < b.MatrixId;
|
|
|
});
|
|
|
- //找Id
|
|
|
- int newId = 1;
|
|
|
- for (const auto& matrix : m_vecSubMatrixs)
|
|
|
+
|
|
|
+ int newSubMatrixID = 0;
|
|
|
+ UINT maxID = 0;
|
|
|
+
|
|
|
+ // 查找最大 MatrixId
|
|
|
+ for (PROGRAM_POINT_MATRIX_STRUCT& subMatrix : m_vecSubMatrixs)
|
|
|
{
|
|
|
- if (matrix.MatrixId == newId)
|
|
|
- {
|
|
|
- newId++;
|
|
|
- }
|
|
|
- else if (matrix.MatrixId > newId)
|
|
|
+ if (subMatrix.MatrixId > maxID)
|
|
|
{
|
|
|
- break;
|
|
|
+ maxID = subMatrix.MatrixId;
|
|
|
}
|
|
|
}
|
|
|
- subMatrix.MatrixId = newId;
|
|
|
+ newSubMatrixID = ++maxID;
|
|
|
+ while (std::any_of(m_vecSubMatrixs.begin(), m_vecSubMatrixs.end(),
|
|
|
+ [newSubMatrixID](const PROGRAM_POINT_MATRIX_STRUCT& subMatrix) {
|
|
|
+ return subMatrix.MatrixId == newSubMatrixID;
|
|
|
+ }))
|
|
|
+ {
|
|
|
+ newSubMatrixID++; // 如果生成的 ID 已经存在,递增直到找到唯一的 ID
|
|
|
+ }
|
|
|
+
|
|
|
+ subMatrix.MatrixId = newSubMatrixID;
|
|
|
subMatrix.strModuleName = "UltraHead";
|
|
|
subMatrix.iModuleId = MODULE_LIST::BondHead;
|
|
|
subMatrix.MatrixRow = 0;
|
|
|
subMatrix.MatrixCol = 0;
|
|
|
+
|
|
|
m_vecSubMatrixs.push_back(subMatrix);
|
|
|
|
|
|
// Add the submatrix to the bond matrix's VecPointMatrixId
|
|
|
//找大矩阵ID/Index
|
|
|
auto currentIt = m_mapOutWidgetIndex.find(outWidget);
|
|
|
int index = currentIt.value(); //迭代器 erase后currentIt被删除了
|
|
|
- m_vectBondMatrixs[index].VecPointMatrixId.push_back(newId);
|
|
|
+ m_vectBondMatrixs[index].VecPointMatrixId.push_back(newSubMatrixID);
|
|
|
|
|
|
AddMatrixPage(index, newSubMatrixIndex, subMatrix, outMatrixGridLayout);
|
|
|
});
|
|
@@ -685,6 +723,49 @@ void BondMatrixProgramPage::AddOutMatrixPage(int vectorIndex, PROGRAM_BOND_MATRI
|
|
|
lineEditNoBondPts->setProperty("parentMatrixIndex", -1); // 设置父矩阵的索引
|
|
|
lineEditNoBondPts->installEventFilter(this);
|
|
|
|
|
|
+ /*QLineEdit* lineEditNoBondPts = new QLineEdit(outWidget);
|
|
|
+ lineEditNoBondPts->setObjectName(QString::fromUtf8("lineEditNoBondPts"));
|
|
|
+ matrixGridLayout->addWidget(lineEditNoBondPts, 7, 1, 1, 3);
|
|
|
+ vecControls.push_back(lineEditNoBondPts);*/
|
|
|
+
|
|
|
+ // Paragram line edit
|
|
|
+ QLabel* labelParagram = new QLabel(outWidget);
|
|
|
+ labelParagram->setObjectName(QString::fromUtf8("labelParagram"));
|
|
|
+ labelParagram->setText(tr("ParagramSet"));
|
|
|
+ matrixGridLayout->addWidget(labelParagram, 8, 0, 1, 1);
|
|
|
+ vecControls.push_back(labelParagram);
|
|
|
+
|
|
|
+ QComboBox* comboBoxParagramSet = new QComboBox(outWidget);
|
|
|
+ comboBoxParagramSet->setObjectName(QString::fromUtf8("comboBoxNoBondPts"));
|
|
|
+ m_mapParagramSetComboBox.insert(comboBoxParagramSet, vectorIndex);
|
|
|
+
|
|
|
+ // 添加选项到下拉框并关联 iInfoId
|
|
|
+ for (const auto& bondMatrix : m_vecBondInfoData) {
|
|
|
+ // 将 iInfoId 作为显示项添加到下拉框
|
|
|
+ QString itemText = QString::number(bondMatrix.iInfoId); // 显示编号 iInfoId
|
|
|
+
|
|
|
+ // 添加项并使用 setData 存储 iInfoId 作为附加数据
|
|
|
+ comboBoxParagramSet->addItem(itemText, bondMatrix.iInfoId);
|
|
|
+ }
|
|
|
+
|
|
|
+ // 将下拉框添加到布局中
|
|
|
+ matrixGridLayout->addWidget(comboBoxParagramSet, 8, 1, 1, 1);
|
|
|
+
|
|
|
+ // 将控件保存到 vecControls 中
|
|
|
+ vecControls.push_back(comboBoxParagramSet);
|
|
|
+ // 连接 QComboBox 的信号和槽
|
|
|
+ connect(comboBoxParagramSet, SIGNAL(currentIndexChanged(int)), this, SLOT(onComboBoxIndexChanged(int)));
|
|
|
+ connect(comboBoxParagramSet, SIGNAL(showPopup()), this, SLOT(onComboBoxPopup()));
|
|
|
+
|
|
|
+
|
|
|
+ QPushButton* buttonParagram = new QPushButton("ShowParagram", this);
|
|
|
+ //buttonParagram->setFixedWidth(62); // Set the same width for the button
|
|
|
+ matrixGridLayout->addWidget(buttonParagram, 8, 2, 1, 2); // Position the button next to RightBottomPos
|
|
|
+
|
|
|
+ connect(buttonParagram, &QPushButton::clicked, this, [=]() {
|
|
|
+ UpdateShowBondInfoData(m_vectBondMatrixs[vectorIndex].BondInfoId);
|
|
|
+ });
|
|
|
+
|
|
|
QFrame* line = new QFrame(outWidget);
|
|
|
line->setFrameShape(QFrame::NoFrame); // 移除默认框架
|
|
|
line->setFixedHeight(2); // 设置固定高度
|
|
@@ -715,10 +796,7 @@ void BondMatrixProgramPage::AddOutMatrixPage(int vectorIndex, PROGRAM_BOND_MATRI
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- /*for (int i = 0; i < vecSubMatrix.size(); i++)
|
|
|
- {
|
|
|
- AddMatrixPage(i, vecSubMatrix[i], outMatrixGridLayout);
|
|
|
- }*/
|
|
|
+
|
|
|
QSpacerItem* vSpacer = new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding);
|
|
|
ui.verticalLayout_3->addItem(vSpacer);
|
|
|
// Add all controls and finalize layout
|
|
@@ -770,6 +848,66 @@ void BondMatrixProgramPage::AddOutMatrixPage(int vectorIndex, PROGRAM_BOND_MATRI
|
|
|
});
|
|
|
}
|
|
|
|
|
|
+void BondMatrixProgramPage::onComboBoxPopup() {
|
|
|
+ // 获取当前的 QComboBox
|
|
|
+ QComboBox* comboBox = qobject_cast<QComboBox*>(sender());
|
|
|
+ if (!comboBox) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ // 清空下拉框中的所有项
|
|
|
+ comboBox->clear();
|
|
|
+
|
|
|
+ // 重新填充下拉框选项,并更新 QMap 中的绑定关系
|
|
|
+ for (const auto& bondMatrix : m_vecBondInfoData) {
|
|
|
+ // 显示编号 iInfoId
|
|
|
+ QString itemText = QString::number(bondMatrix.iInfoId);
|
|
|
+
|
|
|
+ // 将 iInfoId 添加到下拉框
|
|
|
+ comboBox->addItem(itemText, bondMatrix.iInfoId);
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+//// 槽函数:每次下拉框弹出时刷新内容
|
|
|
+//void BondMatrixProgramPage::onComboBoxPopup() {
|
|
|
+// // 清空下拉框中的所有项
|
|
|
+// comboBoxParagramSet->clear();
|
|
|
+//
|
|
|
+// // 重新填充下拉框选项
|
|
|
+// for (const auto& bondMatrix : m_vecBondInfoData) {
|
|
|
+// // 显示编号 iInfoId
|
|
|
+// QString itemText = QString::number(bondMatrix.iInfoId);
|
|
|
+//
|
|
|
+// // 将 iInfoId 添加到下拉框
|
|
|
+// comboBoxParagramSet->addItem(itemText, bondMatrix.iInfoId);
|
|
|
+// }
|
|
|
+//}
|
|
|
+void BondMatrixProgramPage::onComboBoxIndexChanged(int index) {
|
|
|
+ // 获取当前选中的 QComboBox
|
|
|
+ QComboBox* comboBox = qobject_cast<QComboBox*>(sender());
|
|
|
+ if (!comboBox) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ // 获取当前选中的 BondInfoId
|
|
|
+ UINT selectedBondInfoId = comboBox->currentData().toUInt();
|
|
|
+
|
|
|
+ // 获取当前 QComboBox 对应的 vectorIndex
|
|
|
+ int vectorIndex = m_mapParagramSetComboBox.value(comboBox, -1); // 从 QMap 中获取 vectorIndex
|
|
|
+
|
|
|
+ if (vectorIndex != -1) {
|
|
|
+ // 更新 m_vectBondMatrixs[vectorIndex].BondInfoId
|
|
|
+ m_vectBondMatrixs[vectorIndex].BondInfoId = selectedBondInfoId;
|
|
|
+
|
|
|
+ //qDebug() << "Updated BondInfoId for vectorIndex: " << vectorIndex;
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ //qDebug() << "No vectorIndex found for the combo box!";
|
|
|
+ }
|
|
|
+
|
|
|
+ // 调用 UpdateShowBondInfoData 更新数据
|
|
|
+ UpdateShowBondInfoData(selectedBondInfoId);
|
|
|
+}
|
|
|
|
|
|
void BondMatrixProgramPage::AddMatrixPage(int vectorIndex, int subVectorIndex, PROGRAM_POINT_MATRIX_STRUCT subMatrix, QGridLayout* layout)
|
|
|
{
|
|
@@ -1094,7 +1232,6 @@ void BondMatrixProgramPage::onNoBondPtsClicked(QLineEdit* lineEdit, int index, i
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-
|
|
|
void BondMatrixProgramPage::AddMatrixParam()
|
|
|
{
|
|
|
|
|
@@ -1129,6 +1266,17 @@ void BondMatrixProgramPage::UpdatePageParam()
|
|
|
|
|
|
}
|
|
|
|
|
|
+int BondMatrixProgramPage::ParamSaveAsEvent()
|
|
|
+{
|
|
|
+ int iWaferPickParamId,iCalibPlaceParamId,iCalibPickParamId,iBondParamId;
|
|
|
+ m_manageDB->GetCProduct()->AddBondParam(m_curWaferPickParam, iWaferPickParamId); //SetBondParam(m_curWaferPickParam.iId, m_curWaferPickParam);
|
|
|
+ m_manageDB->GetCProduct()->AddBondParam(m_curCalibPlaceParam, iCalibPlaceParamId);
|
|
|
+ m_manageDB->GetCProduct()->AddBondParam(m_curCalibPickParam, iCalibPickParamId);
|
|
|
+ m_manageDB->GetCProduct()->AddBondParam(m_curBondParam, iBondParamId);
|
|
|
+ int iInfoId;
|
|
|
+ m_manageDB->GetCProduct()->AddBondInfoData(m_curBondInfo, iInfoId);
|
|
|
+ return iInfoId;
|
|
|
+}
|
|
|
void BondMatrixProgramPage::ParamChangeEvent()
|
|
|
{
|
|
|
m_manageDB->GetCProduct()->SetBondInfoData(m_curBondInfo.iInfoId, m_curBondInfo);
|
|
@@ -1229,17 +1377,6 @@ void BondMatrixProgramPage::UpdatePageBondParam()
|
|
|
|
|
|
void BondMatrixProgramPage::initPage()
|
|
|
{
|
|
|
- if (m_manageDB == nullptr)
|
|
|
- {
|
|
|
- return;
|
|
|
- }
|
|
|
- //从后端获取数据
|
|
|
- m_vectBondMatrixs = m_manageDB->GetCProduct()->GetBondMatrix();
|
|
|
- m_manageDB->GetCProduct()->GetAllPointMatrix(m_vecSubMatrixs);
|
|
|
- if (m_vectBondMatrixs.size() == 0)
|
|
|
- {
|
|
|
- return;
|
|
|
- }
|
|
|
|
|
|
//for (int i = 0; i < m_vectBondMatrixs.size(); i++)
|
|
|
//{
|
|
@@ -1309,9 +1446,22 @@ void BondMatrixProgramPage::initPage()
|
|
|
{
|
|
|
return;
|
|
|
}
|
|
|
+ UpdateShowBondInfoData(m_vectBondMatrixs[0].BondInfoId);
|
|
|
+ ////pBondMatrix->GetPintInfoByIndex(0, m_curPointInfo);
|
|
|
+ //m_manageDB->GetCProduct()->GetBondInfoData(m_vectBondMatrixs[0].BondInfoId, m_curBondInfo);
|
|
|
+ //m_manageDB->GetCProduct()->GetBondParam(m_curBondInfo.iPickParamId, m_curWaferPickParam);
|
|
|
+ //m_manageDB->GetCProduct()->GetBondParam(m_curBondInfo.iCalibBondParamId, m_curCalibPlaceParam);
|
|
|
+ //m_manageDB->GetCProduct()->GetBondParam(m_curBondInfo.iCalibPickParamId, m_curCalibPickParam);
|
|
|
+ //m_manageDB->GetCProduct()->GetBondParam(m_curBondInfo.iBondParamId, m_curBondParam);
|
|
|
+
|
|
|
+ ////显示界面参数
|
|
|
+ //UpdatePageParam();
|
|
|
+}
|
|
|
+
|
|
|
+void BondMatrixProgramPage::UpdateShowBondInfoData(UINT iInfoId) {
|
|
|
|
|
|
//pBondMatrix->GetPintInfoByIndex(0, m_curPointInfo);
|
|
|
- m_manageDB->GetCProduct()->GetBondInfoData(m_vectBondMatrixs[0].BondInfoId, m_curBondInfo);
|
|
|
+ m_manageDB->GetCProduct()->GetBondInfoData(iInfoId, m_curBondInfo);
|
|
|
m_manageDB->GetCProduct()->GetBondParam(m_curBondInfo.iPickParamId, m_curWaferPickParam);
|
|
|
m_manageDB->GetCProduct()->GetBondParam(m_curBondInfo.iCalibBondParamId, m_curCalibPlaceParam);
|
|
|
m_manageDB->GetCProduct()->GetBondParam(m_curBondInfo.iCalibPickParamId, m_curCalibPickParam);
|
|
@@ -1320,3 +1470,4 @@ void BondMatrixProgramPage::initPage()
|
|
|
//显示界面参数
|
|
|
UpdatePageParam();
|
|
|
}
|
|
|
+
|