WaffleProgramPage.cpp 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463
  1. #include "WaffleProgramPage.h"
  2. #include <QGroupBox>
  3. #include <QLineEdit>
  4. #include "Src/RewriteControl/Controls/SpinBox.h"
  5. #include "Src/RewriteControl/Controls/DoubleSpinBox.h"
  6. #include <QLabel>
  7. #include <View/die-bonder-ui/Src/MatrixDialogs/NoBondPtEditDialog.h>
  8. WaffleProgramPage::WaffleProgramPage(QWidget* parent)
  9. :QWidget(parent)
  10. {
  11. ui.setupUi(this);
  12. setStyleSheet(
  13. "QDoubleSpinBox{background: #FFFFFF;border: 1px solid #BABBDC;border - radius: 6px;padding: 2px 5px;}"
  14. "QSpinBox{background: #FFFFFF;border: 1px solid #BABBDC;border - radius: 6px;padding: 2px 5px;}"
  15. "QLineEdit{background: #FFFFFF;border: 1px solid #BABBDC;border - radius: 6px;padding: 2px 5px;}"
  16. "QCheckBox::indicator{width: 20px;height: 20px;}"
  17. "QCheckBox::indicator:unchecked{background - color: #FFFFFF;border-radius: 2px;}"
  18. "QComboBox{background: #FFFFFF;border: 1px solid #BABBDC;border - radius: 6px;padding: 2px 5px;}"
  19. "QComboBox::drop - down{width: 20px;}"
  20. );
  21. m_manageDB = CManageDB::GetInstance();
  22. if (m_manageDB == nullptr) return;
  23. m_pProduct = m_manageDB->GetCProduct();
  24. if (m_pProduct == nullptr) return;
  25. initPage();
  26. }
  27. WaffleProgramPage::~WaffleProgramPage()
  28. {
  29. }
  30. void WaffleProgramPage::AddMatrixPage(int vectorIndex, PROGRAM_WAFFLE_MATRIX_STRUCT matrixData, std::vector<PROGRAM_DIE_MATRIX_STRUCT> vecSubMatrix)
  31. {
  32. int matrixNum = m_mapSubMatrixControls.size();
  33. int newMatrixID = ++matrixNum;
  34. QVector<QObject*> vecControls;
  35. QGroupBox* groupBox = new QGroupBox();
  36. QGridLayout* outMatrixGridLayout = new QGridLayout();
  37. outMatrixGridLayout->setSpacing(6);
  38. outMatrixGridLayout->setObjectName(QString::fromUtf8("subGridLayout"));
  39. groupBox->setLayout(outMatrixGridLayout);
  40. QGridLayout* subGridLayout = new QGridLayout();
  41. subGridLayout->setSpacing(6);
  42. subGridLayout->setObjectName(QString::fromUtf8("subGridLayout"));
  43. //groupBox->setLayout(subGridLayout);
  44. QLabel* labelTitle = new QLabel(this);
  45. labelTitle->setObjectName(QString::fromUtf8("labelTitle"));
  46. labelTitle->setText(tr("Sub Matrix ") + QString::number(vectorIndex));
  47. subGridLayout->addWidget(labelTitle, 0, 0, 1, 1);
  48. vecControls.push_back(labelTitle);
  49. QLabel* labelRow = new QLabel(this);
  50. labelRow->setObjectName(QString::fromUtf8("labelRow"));
  51. labelRow->setText(tr("Row "));
  52. subGridLayout->addWidget(labelRow, 1, 0, 1, 1);
  53. vecControls.push_back(labelRow);
  54. SpinBox* spinBoxRow = new SpinBox(this);
  55. spinBoxRow->setObjectName(QString::fromUtf8("spinBoxRow"));
  56. subGridLayout->addWidget(spinBoxRow, 1, 1, 1, 1);
  57. vecControls.push_back(spinBoxRow);
  58. QLabel* labelCol = new QLabel(this);
  59. labelCol->setObjectName(QString::fromUtf8("labelCol"));
  60. labelCol->setText(tr("Cow "));
  61. subGridLayout->addWidget(labelCol, 2, 0, 1, 1);
  62. vecControls.push_back(labelCol);
  63. SpinBox* spinBoxCol = new SpinBox(this);
  64. spinBoxCol->setObjectName(QString::fromUtf8("spinBoxCol"));
  65. subGridLayout->addWidget(spinBoxCol, 2, 1, 1, 1);
  66. vecControls.push_back(spinBoxCol);
  67. QLabel* labelLeftTop = new QLabel(this);
  68. labelLeftTop->setObjectName(QString::fromUtf8("labelLeftTop"));
  69. labelLeftTop->setText(tr("Left Top Pos "));
  70. subGridLayout->addWidget(labelLeftTop, 4, 0, 1, 1);
  71. vecControls.push_back(labelLeftTop);
  72. DoubleSpinBox* doubleSpinBoxLeftTopX = new DoubleSpinBox(this);
  73. doubleSpinBoxLeftTopX->setObjectName(QString::fromUtf8("doubleSpinBoxLeftTopX"));
  74. subGridLayout->addWidget(doubleSpinBoxLeftTopX, 4, 1, 1, 1);
  75. vecControls.push_back(doubleSpinBoxLeftTopX);
  76. DoubleSpinBox* doubleSpinBoxLeftTopY = new DoubleSpinBox(this);
  77. doubleSpinBoxLeftTopY->setObjectName(QString::fromUtf8("doubleSpinBoxLeftTopY"));
  78. subGridLayout->addWidget(doubleSpinBoxLeftTopY, 4, 2, 1, 1);
  79. vecControls.push_back(doubleSpinBoxLeftTopY);
  80. QLabel* labelRightTopPos = new QLabel(this);
  81. labelRightTopPos->setObjectName(QString::fromUtf8("labelRightTopPos"));
  82. labelRightTopPos->setText(tr("Right Top Pos "));
  83. subGridLayout->addWidget(labelRightTopPos, 5, 0, 1, 1);
  84. vecControls.push_back(labelRightTopPos);
  85. DoubleSpinBox* doubleSpinBoxRightTopX = new DoubleSpinBox(this);
  86. doubleSpinBoxRightTopX->setObjectName(QString::fromUtf8("doubleSpinBoxRightTopX"));
  87. subGridLayout->addWidget(doubleSpinBoxRightTopX, 5, 1, 1, 1);
  88. vecControls.push_back(doubleSpinBoxRightTopX);
  89. DoubleSpinBox* doubleSpinBoxRightTopY = new DoubleSpinBox(this);
  90. doubleSpinBoxRightTopY->setObjectName(QString::fromUtf8("doubleSpinBoxRightTopY"));
  91. subGridLayout->addWidget(doubleSpinBoxRightTopY, 5, 2, 1, 1);
  92. vecControls.push_back(doubleSpinBoxRightTopY);
  93. QLabel* labelRightButtomPos = new QLabel(this);
  94. labelRightButtomPos->setObjectName(QString::fromUtf8("labelRightButtomPos"));
  95. labelRightButtomPos->setText(tr("Right Buttom pos"));
  96. subGridLayout->addWidget(labelRightButtomPos, 6, 0, 1, 1);
  97. vecControls.push_back(labelRightButtomPos);
  98. DoubleSpinBox* doubleSpinBoxRightButtomX = new DoubleSpinBox(this);
  99. doubleSpinBoxRightButtomX->setObjectName(QString::fromUtf8("doubleSpinBoxRightButtomX"));
  100. subGridLayout->addWidget(doubleSpinBoxRightButtomX, 6, 1, 1, 1);
  101. vecControls.push_back(doubleSpinBoxRightButtomX);
  102. DoubleSpinBox* doubleSpinBoxRightButtomY = new DoubleSpinBox(this);
  103. doubleSpinBoxRightButtomY->setObjectName(QString::fromUtf8("doubleSpinBoxRightButtomY"));
  104. subGridLayout->addWidget(doubleSpinBoxRightButtomY, 6, 2, 1, 1);
  105. vecControls.push_back(doubleSpinBoxRightTopX);
  106. QLabel* labelNoBondPts = new QLabel(this);
  107. labelNoBondPts->setObjectName(QString::fromUtf8("labelNoBondPts"));
  108. labelNoBondPts->setText(tr("No Bond Points"));
  109. subGridLayout->addWidget(labelNoBondPts, 7, 0, 1, 1);
  110. vecControls.push_back(labelNoBondPts);
  111. QLineEdit* lineEditNoBondPts = new QLineEdit(this);
  112. lineEditNoBondPts->setObjectName(QString::fromUtf8("lineEditNoBondPts"));
  113. lineEditNoBondPts->setReadOnly(true);
  114. lineEditNoBondPts->setCursor(Qt::PointingHandCursor);
  115. lineEditNoBondPts->setProperty("vectorIndex", vectorIndex); // 存储索引
  116. lineEditNoBondPts->installEventFilter(this);
  117. /*connect(lineEditNoBondPts, &QLineEdit::selectionChanged, this, [=]() {
  118. this->onNoBondPtsClicked(lineEditNoBondPts, vectorIndex);
  119. });*/
  120. subGridLayout->addWidget(lineEditNoBondPts, 7, 1, 1, 2);
  121. vecControls.push_back(lineEditNoBondPts);
  122. outMatrixGridLayout->addLayout(subGridLayout, 0, 0);
  123. QFrame* line = new QFrame();
  124. line->setFrameShape(QFrame::NoFrame); // 移除默认框架
  125. line->setFixedHeight(2); // 设置固定高度
  126. line->setStyleSheet("background-color: #C7CAEB;");
  127. outMatrixGridLayout->addWidget(line);
  128. ui.verticalLayout->addWidget(groupBox);
  129. for (int j = 0; j < matrixData.VecDieMatrixId.size(); j++)
  130. {
  131. for (int i = 0; i < m_vecSubWaffleMatrix.size(); i++)
  132. {
  133. if (matrixData.VecDieMatrixId[j] == m_vecSubWaffleMatrix[i].MatrixId)
  134. {
  135. AddSubMatrixPage(i, m_vecSubWaffleMatrix[i], outMatrixGridLayout);
  136. }
  137. }
  138. }
  139. //for (int i = 0; i = vecSubMatrix.size(); i++)
  140. //{
  141. // AddSubMatrixPage(i, vecSubMatrix[i], outMatrixGridLayout);
  142. //}
  143. connect(spinBoxRow, &SpinBox::editDone, this, [=]() {
  144. m_vecWaffleMatrix[vectorIndex].PackRow = spinBoxRow->value();
  145. });
  146. connect(spinBoxCol, &SpinBox::editDone, this, [=]() {
  147. m_vecWaffleMatrix[vectorIndex].PackCol = spinBoxCol->value();
  148. });
  149. connect(doubleSpinBoxLeftTopX, &DoubleSpinBox::editDone, this, [=]() {
  150. m_vecWaffleMatrix[vectorIndex].LeftTopPoint.x = doubleSpinBoxLeftTopX->value();
  151. });
  152. connect(doubleSpinBoxLeftTopY, &DoubleSpinBox::editDone, this, [=]() {
  153. m_vecWaffleMatrix[vectorIndex].LeftTopPoint.y = doubleSpinBoxLeftTopY->value();
  154. });
  155. connect(doubleSpinBoxRightTopX, &DoubleSpinBox::editDone, this, [=]() {
  156. m_vecWaffleMatrix[vectorIndex].RightTopPoint.x = doubleSpinBoxRightTopX->value();
  157. });
  158. connect(doubleSpinBoxRightTopY, &DoubleSpinBox::editDone, this, [=]() {
  159. m_vecWaffleMatrix[vectorIndex].RightTopPoint.y = doubleSpinBoxRightTopY->value();
  160. });
  161. connect(doubleSpinBoxRightButtomX, &DoubleSpinBox::editDone, this, [=]() {
  162. m_vecWaffleMatrix[vectorIndex].RightBottomPoint.x = doubleSpinBoxRightButtomX->value();
  163. });
  164. connect(doubleSpinBoxRightButtomY, &DoubleSpinBox::editDone, this, [=]() {
  165. m_vecWaffleMatrix[vectorIndex].RightBottomPoint.y = doubleSpinBoxRightButtomY->value();
  166. });
  167. connect(lineEditNoBondPts, &QLineEdit::textChanged, this, [=]() {
  168. });
  169. }
  170. bool WaffleProgramPage::eventFilter(QObject* obj, QEvent* event) {
  171. if (event->type() == QEvent::MouseButtonPress) {
  172. auto* lineEdit = qobject_cast<QLineEdit*>(obj);
  173. if (lineEdit) {
  174. int index = lineEdit->property("vectorIndex").toInt();
  175. onNoBondPtsClicked(lineEdit, index);
  176. return true; // 拦截事件
  177. }
  178. }
  179. return QWidget::eventFilter(obj, event);
  180. }
  181. void WaffleProgramPage::onNoBondPtsClicked(QLineEdit* lineEdit, int index) {
  182. if (index < 0 || index >= m_vecWaffleMatrix.size()) return;
  183. const auto& waffle = m_vecWaffleMatrix[index];
  184. NoBondPtEditDialog dlg(waffle.PackRow, waffle.PackCol, waffle.VecNoBondDie, this);
  185. if (dlg.exec() == QDialog::Accepted) {
  186. QVector<XY_LONG_STRUCT> selected = dlg.getSelectedPoints();
  187. m_vecWaffleMatrix[index].VecNoBondDie = std::vector<XY_LONG_STRUCT>(selected.begin(), selected.end());
  188. QStringList ptList;
  189. for (const auto& pt : selected)
  190. ptList << QString("(%1,%2)").arg(pt.x).arg(pt.y);
  191. lineEdit->setText(ptList.join(" "));
  192. }
  193. }
  194. void WaffleProgramPage::AddSubMatrixPage(int subVectorIndex, PROGRAM_DIE_MATRIX_STRUCT subMatrix, QGridLayout* layout)
  195. {
  196. QVector<QObject*> vecControls;
  197. QGridLayout* subGridLayout = new QGridLayout();
  198. subGridLayout->setSpacing(6);
  199. subGridLayout->setObjectName(QString::fromUtf8("subGridLayout"));
  200. //groupBox->setLayout(subGridLayout);
  201. QLabel* labelTitle = new QLabel(this);
  202. labelTitle->setObjectName(QString::fromUtf8("labelTitle"));
  203. labelTitle->setText(tr("Sub Matrix ") + QString::number(subVectorIndex));
  204. subGridLayout->addWidget(labelTitle, 0, 0, 1, 1);
  205. vecControls.push_back(labelTitle);
  206. labelTitle->setStyleSheet("background-color: #F0F0F0;");
  207. QLabel* labelRow = new QLabel(this);
  208. labelRow->setObjectName(QString::fromUtf8("labelRow"));
  209. labelRow->setText(tr("Row "));
  210. subGridLayout->addWidget(labelRow, 1, 0, 1, 1);
  211. vecControls.push_back(labelRow);
  212. SpinBox* spinBoxRow = new SpinBox(this);
  213. spinBoxRow->setObjectName(QString::fromUtf8("spinBoxRow"));
  214. subGridLayout->addWidget(spinBoxRow, 1, 1, 1, 1);
  215. vecControls.push_back(spinBoxRow);
  216. QLabel* labelCol = new QLabel(this);
  217. labelCol->setObjectName(QString::fromUtf8("labelCol"));
  218. labelCol->setText(tr("Cow "));
  219. subGridLayout->addWidget(labelCol, 2, 0, 1, 1);
  220. vecControls.push_back(labelCol);
  221. SpinBox* spinBoxCol = new SpinBox(this);
  222. spinBoxCol->setObjectName(QString::fromUtf8("spinBoxCol"));
  223. subGridLayout->addWidget(spinBoxCol, 2, 1, 1, 1);
  224. vecControls.push_back(spinBoxCol);
  225. QLabel* labelLeftTop = new QLabel(this);
  226. labelLeftTop->setObjectName(QString::fromUtf8("labelLeftTop"));
  227. labelLeftTop->setText(tr("Left Top Pos "));
  228. subGridLayout->addWidget(labelLeftTop, 4, 0, 1, 1);
  229. vecControls.push_back(labelLeftTop);
  230. DoubleSpinBox* doubleSpinBoxLeftTopX = new DoubleSpinBox(this);
  231. doubleSpinBoxLeftTopX->setObjectName(QString::fromUtf8("doubleSpinBoxLeftTopX"));
  232. subGridLayout->addWidget(doubleSpinBoxLeftTopX, 4, 1, 1, 1);
  233. vecControls.push_back(doubleSpinBoxLeftTopX);
  234. DoubleSpinBox* doubleSpinBoxLeftTopY = new DoubleSpinBox(this);
  235. doubleSpinBoxLeftTopY->setObjectName(QString::fromUtf8("doubleSpinBoxLeftTopY"));
  236. subGridLayout->addWidget(doubleSpinBoxLeftTopY, 4, 2, 1, 1);
  237. vecControls.push_back(doubleSpinBoxLeftTopY);
  238. QLabel* labelRightTopPos = new QLabel(this);
  239. labelRightTopPos->setObjectName(QString::fromUtf8("labelRightTopPos"));
  240. labelRightTopPos->setText(tr("Right Top Pos "));
  241. subGridLayout->addWidget(labelRightTopPos, 5, 0, 1, 1);
  242. vecControls.push_back(labelRightTopPos);
  243. DoubleSpinBox* doubleSpinBoxRightTopX = new DoubleSpinBox(this);
  244. doubleSpinBoxRightTopX->setObjectName(QString::fromUtf8("doubleSpinBoxRightTopX"));
  245. subGridLayout->addWidget(doubleSpinBoxRightTopX, 5, 1, 1, 1);
  246. vecControls.push_back(doubleSpinBoxRightTopX);
  247. DoubleSpinBox* doubleSpinBoxRightTopY = new DoubleSpinBox(this);
  248. doubleSpinBoxRightTopY->setObjectName(QString::fromUtf8("doubleSpinBoxRightTopY"));
  249. subGridLayout->addWidget(doubleSpinBoxRightTopY, 5, 2, 1, 1);
  250. vecControls.push_back(doubleSpinBoxRightTopY);
  251. QLabel* labelRightButtomPos = new QLabel(this);
  252. labelRightButtomPos->setObjectName(QString::fromUtf8("labelRightButtomPos"));
  253. labelRightButtomPos->setText(tr("Right Buttom pos"));
  254. subGridLayout->addWidget(labelRightButtomPos, 6, 0, 1, 1);
  255. vecControls.push_back(labelRightButtomPos);
  256. DoubleSpinBox* doubleSpinBoxRightButtomX = new DoubleSpinBox(this);
  257. doubleSpinBoxRightButtomX->setObjectName(QString::fromUtf8("doubleSpinBoxRightButtomX"));
  258. subGridLayout->addWidget(doubleSpinBoxRightButtomX, 6, 1, 1, 1);
  259. vecControls.push_back(doubleSpinBoxRightButtomX);
  260. DoubleSpinBox* doubleSpinBoxRightButtomY = new DoubleSpinBox(this);
  261. doubleSpinBoxRightButtomY->setObjectName(QString::fromUtf8("doubleSpinBoxRightButtomY"));
  262. subGridLayout->addWidget(doubleSpinBoxRightButtomY, 6, 2, 1, 1);
  263. vecControls.push_back(doubleSpinBoxRightTopX);
  264. QLabel* labelNoBondPts = new QLabel(this);
  265. labelNoBondPts->setObjectName(QString::fromUtf8("labelNoBondPts"));
  266. labelNoBondPts->setText(tr("No Bond Points"));
  267. subGridLayout->addWidget(labelNoBondPts, 7, 0, 1, 1);
  268. vecControls.push_back(labelNoBondPts);
  269. QLineEdit* lineEditNoBondPts = new QLineEdit(this);
  270. lineEditNoBondPts->setObjectName(QString::fromUtf8("lineEditNoBondPts"));
  271. lineEditNoBondPts->setReadOnly(true);
  272. lineEditNoBondPts->setCursor(Qt::PointingHandCursor);
  273. lineEditNoBondPts->setProperty("subVectorIndex", subVectorIndex); // 存储索引
  274. lineEditNoBondPts->installEventFilter(this);
  275. subGridLayout->addWidget(lineEditNoBondPts, 7, 1, 1, 2);
  276. vecControls.push_back(lineEditNoBondPts);
  277. layout->addLayout(subGridLayout, 11, 0);
  278. QFrame* line = new QFrame();
  279. line->setFrameShape(QFrame::NoFrame); // 移除默认框架
  280. line->setFixedHeight(2); // 设置固定高度
  281. line->setStyleSheet("background-color: #C7CAEB;");
  282. ui.verticalLayout->addWidget(line);
  283. connect(spinBoxRow, &SpinBox::editDone, this, [=]() {
  284. m_vecSubWaffleMatrix[subVectorIndex].MatrixRow = spinBoxRow->value();
  285. });
  286. connect(spinBoxCol, &SpinBox::editDone, this, [=]() {
  287. m_vecSubWaffleMatrix[subVectorIndex].MatrixCol = spinBoxCol->value();
  288. });
  289. connect(doubleSpinBoxLeftTopX, &DoubleSpinBox::editDone, this, [=]() {
  290. m_vecSubWaffleMatrix[subVectorIndex].LeftTopPoint.x = doubleSpinBoxLeftTopX->value();
  291. });
  292. connect(doubleSpinBoxLeftTopY, &DoubleSpinBox::editDone, this, [=]() {
  293. m_vecSubWaffleMatrix[subVectorIndex].LeftTopPoint.y = doubleSpinBoxLeftTopY->value();
  294. });
  295. connect(doubleSpinBoxRightTopX, &DoubleSpinBox::editDone, this, [=]() {
  296. m_vecSubWaffleMatrix[subVectorIndex].RightTopPoint.x = doubleSpinBoxRightTopX->value();
  297. });
  298. connect(doubleSpinBoxRightTopY, &DoubleSpinBox::editDone, this, [=]() {
  299. m_vecSubWaffleMatrix[subVectorIndex].RightTopPoint.y = doubleSpinBoxRightTopY->value();
  300. });
  301. connect(doubleSpinBoxRightButtomX, &DoubleSpinBox::editDone, this, [=]() {
  302. m_vecSubWaffleMatrix[subVectorIndex].RightBottomPoint.x = doubleSpinBoxRightButtomX->value();
  303. });
  304. connect(doubleSpinBoxRightButtomY, &DoubleSpinBox::editDone, this, [=]() {
  305. m_vecSubWaffleMatrix[subVectorIndex].RightBottomPoint.y = doubleSpinBoxRightButtomY->value();
  306. });
  307. connect(lineEditNoBondPts, &QLineEdit::textChanged, this, [=]() {
  308. });
  309. }
  310. void WaffleProgramPage::SaveAllParam()
  311. {
  312. }
  313. void WaffleProgramPage::MatrixChangeEvent()
  314. {
  315. for (PROGRAM_WAFFLE_MATRIX_STRUCT& waffleMatrix : m_vecWaffleMatrix)
  316. {
  317. m_pProduct->SetWaffleMatrix(waffleMatrix.MatrixId, waffleMatrix);
  318. }
  319. m_pProduct->SetDieMatrix(m_vecSubWaffleMatrix, true);
  320. //for (PROGRAM_BOND_MATRIX_STRUCT& bondMatrix : m_vecWaffleMatrix)
  321. //{
  322. // m_manageDB->GetCProduct()->SetBondMatrix(bondMatrix.BondMatrixId, bondMatrix);
  323. //}
  324. //for (PROGRAM_POINT_MATRIX_STRUCT& pointMatrix : m_vecSubMatrixs)
  325. //{
  326. // m_manageDB->GetCProduct()->SetPointMatrix(pointMatrix.MatrixId, pointMatrix);
  327. //}
  328. }
  329. void WaffleProgramPage::initPage()
  330. {
  331. m_vecWaffleMatrix = m_pProduct->GetWaffleMatrix();
  332. for (int i = 0; i < m_vecWaffleMatrix.size(); i++)
  333. {
  334. for (int j = 0; j < m_vecWaffleMatrix[i].VecDieMatrixId.size(); j++)
  335. {
  336. PROGRAM_DIE_MATRIX_STRUCT subMatrix;
  337. m_pProduct->GetDieMatrix(m_vecWaffleMatrix[i].VecDieMatrixId[j], subMatrix);
  338. m_vecSubWaffleMatrix.push_back(subMatrix);
  339. //AddMatrixPage(i, j, subMatrix);
  340. }
  341. AddMatrixPage(i, m_vecWaffleMatrix[i], m_vecSubWaffleMatrix);
  342. //for (int j = 0; j < m_vecWaffleMatrix[i].VecDieMatrixId.size(); j++)
  343. //{
  344. // for (int k = 0; k < m_vecSubWaffleMatrix.size(); k++)
  345. // {
  346. // if (m_vecWaffleMatrix[i].VecDieMatrixId[j] == m_vecSubWaffleMatrix[k].MatrixId)
  347. // {
  348. // AddSubMatrixPage(i, m_vecSubWaffleMatrix[k],nullptr);
  349. // }
  350. // }
  351. //}
  352. }
  353. }