ProgrammPage.cpp 35 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952
  1. #include "ProgrammPage.h"
  2. #include "Src/RewriteControl/Controls/SpinBox.h"
  3. #include "Src/RewriteControl/Controls/DoubleSpinBox.h"
  4. #include <QPushButton>
  5. ProgrammPage::ProgrammPage(QWidget *parent)
  6. : QWidget(parent)
  7. {
  8. ui.setupUi(this);
  9. ui.spinBoxRow->setVisible(false);
  10. ui.spinBoxCol->setVisible(false);
  11. ui.doubleSpinBoxLeftTopX->setVisible(false);
  12. ui.doubleSpinBoxLeftTopY->setVisible(false);
  13. ui.doubleSpinBoxRightTopX->setVisible(false);
  14. ui.doubleSpinBoxRightTopY->setVisible(false);
  15. ui.doubleSpinBoxRightButtomX->setVisible(false);
  16. ui.doubleSpinBoxRightButtomY->setVisible(false);
  17. ui.lineEditNoBondPts->setVisible(false);
  18. ui.label->setVisible(false);
  19. ui.label_18->setVisible(false);
  20. ui.label_2->setVisible(false);
  21. ui.label_79->setVisible(false);
  22. ui.label_80->setVisible(false);
  23. ui.label_81->setVisible(false);
  24. ui.label_82->setVisible(false);
  25. ui.frame->setFrameShape(QFrame::NoFrame); // 盧뇜칵훰움솥
  26. ui.frame->setFixedHeight(2); // �零미땍멕똑
  27. ui.frame->setStyleSheet("background-color: #C7CAEB;");
  28. setStyleSheet(
  29. "QDoubleSpinBox{background: #FFFFFF;border: 1px solid #BABBDC;border - radius: 6px;padding: 2px 5px;}"
  30. "QSpinBox{background: #FFFFFF;border: 1px solid #BABBDC;border - radius: 6px;padding: 2px 5px;}"
  31. "QLineEdit{background: #FFFFFF;border: 1px solid #BABBDC;border - radius: 6px;padding: 2px 5px;}"
  32. "QCheckBox::indicator{width: 20px;height: 20px;}"
  33. "QCheckBox::indicator:unchecked{background - color: #FFFFFF;border-radius: 2px;}"
  34. "QComboBox{background: #FFFFFF;border: 1px solid #BABBDC;border - radius: 6px;padding: 2px 5px;}"
  35. "QComboBox::drop - down{width: 20px;}"
  36. );
  37. ui.tab->setStyleSheet("background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #F1F4FD, stop: 1 #E5E4F6)");
  38. m_pWaffleProgrammPage = new WaffleProgramPage(this);
  39. m_manageDB = CManageDB::GetInstance();
  40. initPage();
  41. connect(ui.pushButtonSave, &QPushButton::clicked, this, [=] {
  42. ParamChangeEvent();
  43. MatrixChangeEvent();
  44. });
  45. //앤黎鑒앴
  46. connect(ui.spinBoxRow, &SpinBox::editingFinished, this, [=]() {
  47. });
  48. connect(ui.spinBoxCol, &SpinBox::editingFinished, this, [=]() {
  49. });
  50. connect(ui.doubleSpinBoxLeftTopX, &DoubleSpinBox::editDone, this, [=]() {
  51. });
  52. connect(ui.doubleSpinBoxLeftTopY, &DoubleSpinBox::editDone, this, [=]() {
  53. });
  54. connect(ui.doubleSpinBoxRightTopX, &DoubleSpinBox::editDone, this, [=]() {
  55. });
  56. connect(ui.doubleSpinBoxRightTopY, &DoubleSpinBox::editDone, this, [=]() {
  57. });
  58. connect(ui.doubleSpinBoxRightButtomX, &DoubleSpinBox::editDone, this, [=]() {
  59. });
  60. connect(ui.doubleSpinBoxRightButtomY, &DoubleSpinBox::editDone, this, [=]() {
  61. });
  62. //꽝鑒
  63. connect(ui.comboBoxDieSource, QOverload<int>::of(&QComboBox::currentIndexChanged), this, [=](int index) {
  64. if (index == 0)
  65. {
  66. m_curBondInfo.eDieSource = DIE_SOURCE::BY_WAFFLE;
  67. } else if (index == 1)
  68. {
  69. m_curBondInfo.eDieSource = DIE_SOURCE::BY_WAFER;
  70. }
  71. ParamChangeEvent();
  72. });
  73. connect(ui.checkBoxIsCalib, &QCheckBox::clicked, this, [=](bool isChecked) {
  74. });
  75. connect(ui.spinBoxPickTempID, &SpinBox::editDone, this, [=]() {
  76. m_curBondInfo.iPickPRStrategyId = ui.spinBoxPickTempID->value();
  77. ParamChangeEvent();
  78. });
  79. connect(ui.spinBoxPickNozzleID, &SpinBox::editDone, this, [=]() {
  80. m_curBondInfo.iPickHeadId = ui.spinBoxPickNozzleID->value();
  81. ParamChangeEvent();
  82. });
  83. connect(ui.spinBoxPreBondTemp, &SpinBox::editDone, this, [=]() {
  84. m_curBondInfo.iBondFrontPRStrategyId = ui.spinBoxPreBondTemp->value();
  85. ParamChangeEvent();
  86. });
  87. connect(ui.spinBoxPostBondTemp, &SpinBox::editDone, this, [=]() {
  88. m_curBondInfo.iBondBackPRStrategyId = ui.spinBoxPostBondTemp->value();
  89. ParamChangeEvent();
  90. });
  91. connect(ui.spinBoxBondTemp, &SpinBox::editDone, this, [=]() {
  92. m_curBondInfo.iBondPRStrategyId = ui.spinBoxBondTemp->value();
  93. ParamChangeEvent();
  94. });
  95. connect(ui.spinBoxLookUpTemp, &SpinBox::editDone, this, [=]() {
  96. m_curBondInfo.iLookUpPRStrategyId = ui.spinBoxLookUpTemp->value();
  97. ParamChangeEvent();
  98. });
  99. connect(ui.spinBoxCalibPickTemp, &SpinBox::editDone, this, [=]() {
  100. m_curBondInfo.iCalibPRStrategyId = ui.spinBoxCalibPickTemp->value();
  101. ParamChangeEvent();
  102. });
  103. connect(ui.spinBoxBondNozzleID, &SpinBox::editDone, this, [=]() {
  104. m_curBondInfo.iBondHeadId = ui.spinBoxBondNozzleID->value();
  105. ParamChangeEvent();
  106. });
  107. connect(ui.doubleSpinBoxBondOffsetX, &DoubleSpinBox::editDone, this, [=]() {
  108. m_curBondInfo.stOffset.x = ui.doubleSpinBoxBondOffsetX->value();
  109. ParamChangeEvent();
  110. });
  111. connect(ui.doubleSpinBoxBondOffsetY, &DoubleSpinBox::editDone, this, [=]() {
  112. m_curBondInfo.stOffset.y = ui.doubleSpinBoxBondOffsetY->value();
  113. ParamChangeEvent();
  114. });
  115. connect(ui.doubleSpinBoxBondOffsetAngle, &DoubleSpinBox::editDone, this, [=]() {
  116. m_curBondInfo.stOffset.a = ui.doubleSpinBoxBondOffsetAngle->value();
  117. ParamChangeEvent();
  118. });
  119. connect(ui.comboBoxPickParamType, &QComboBox::currentTextChanged, this, [=]() {
  120. UpdatePagePickParam();
  121. });
  122. connect(ui.checkBoxPickBlockCheck, &QCheckBox::clicked, this, [=](bool isChecked) {
  123. if (ui.comboBoxPickParamType->currentIndex() == 0)//빽뤼분
  124. {
  125. m_curWaferPickParam.bCheckBlock = ui.checkBoxPickBlockCheck->isChecked();
  126. }
  127. else if (ui.comboBoxPickParamType->currentIndex() == 1)//쑨途憩
  128. {
  129. m_curCalibPickParam.bCheckBlock = ui.checkBoxPickBlockCheck->isChecked();
  130. }
  131. ParamChangeEvent();
  132. });
  133. connect(ui.checkBoxPickLoseCheck, &QCheckBox::clicked, this, [=](bool isChecked) {
  134. if (ui.comboBoxPickParamType->currentIndex() == 0)//빽뤼분
  135. {
  136. m_curWaferPickParam.bCheckLose = ui.checkBoxPickLoseCheck->isChecked();
  137. } else if (ui.comboBoxPickParamType->currentIndex() == 1)//쑨途憩
  138. {
  139. m_curCalibPickParam.bCheckLose = ui.checkBoxPickLoseCheck->isChecked();
  140. }
  141. ParamChangeEvent();
  142. });
  143. connect(ui.checkBoxPickFindForceCheck, &QCheckBox::clicked, this, [=](bool isChecked) {
  144. if (ui.comboBoxPickParamType->currentIndex() == 0)//빽뤼분
  145. {
  146. m_curWaferPickParam.bFindForce = ui.checkBoxPickFindForceCheck->isChecked();
  147. } else if (ui.comboBoxPickParamType->currentIndex() == 1)//쑨途憩
  148. {
  149. m_curCalibPickParam.bFindForce = ui.checkBoxPickFindForceCheck->isChecked();
  150. }
  151. ParamChangeEvent();
  152. });
  153. connect(ui.doubleSpinBoxPrePickZ, &DoubleSpinBox::editDone, this, [=]() {
  154. if (ui.comboBoxPickParamType->currentIndex() == 0)//빽뤼분
  155. {
  156. m_curWaferPickParam.dPreLev = ui.doubleSpinBoxPrePickZ->value();
  157. } else if (ui.comboBoxPickParamType->currentIndex() == 1)//쑨途憩
  158. {
  159. m_curCalibPickParam.dPreLev = ui.doubleSpinBoxPrePickZ->value();
  160. }
  161. ParamChangeEvent();
  162. });
  163. connect(ui.doubleSpinBoxPickForce, &DoubleSpinBox::editDone, this, [=]() {
  164. if (ui.comboBoxPickParamType->currentIndex() == 0)//빽뤼분
  165. {
  166. m_curWaferPickParam.dForce = ui.doubleSpinBoxPickForce->value();
  167. } else if (ui.comboBoxPickParamType->currentIndex() == 1)//쑨途憩
  168. {
  169. m_curCalibPickParam.dForce = ui.doubleSpinBoxPickForce->value();
  170. }
  171. ParamChangeEvent();
  172. });
  173. connect(ui.doubleSpinBoxPickPosZ, &DoubleSpinBox::editDone, this, [=]() {
  174. if (ui.comboBoxPickParamType->currentIndex() == 0)//빽뤼분
  175. {
  176. m_curWaferPickParam.dPickOrBondLev = ui.doubleSpinBoxPickPosZ->value();
  177. } else if (ui.comboBoxPickParamType->currentIndex() == 1)//쑨途憩
  178. {
  179. m_curCalibPickParam.dPickOrBondLev = ui.doubleSpinBoxPickPosZ->value();
  180. }
  181. ParamChangeEvent();
  182. });
  183. connect(ui.spinBoxPickGrabDelay, &SpinBox::editDone, this, [=]() {
  184. if (ui.comboBoxPickParamType->currentIndex() == 0)//빽뤼분
  185. {
  186. m_curWaferPickParam.iGrabDelay = ui.spinBoxPickGrabDelay->value();
  187. } else if (ui.comboBoxPickParamType->currentIndex() == 1)//쑨途憩
  188. {
  189. m_curCalibPickParam.iGrabDelay = ui.spinBoxPickGrabDelay->value();
  190. }
  191. ParamChangeEvent();
  192. });
  193. connect(ui.spinBox_PickDelay, &SpinBox::editDone, this, [=]() {
  194. if (ui.comboBoxPickParamType->currentIndex() == 0)//빽뤼분
  195. {
  196. m_curWaferPickParam.iPickOrBondDelay = ui.spinBox_PickDelay->value();
  197. } else if (ui.comboBoxPickParamType->currentIndex() == 1)//쑨途憩
  198. {
  199. m_curCalibPickParam.iPickOrBondDelay = ui.spinBox_PickDelay->value();
  200. }
  201. ParamChangeEvent();
  202. });
  203. connect(ui.spinBoxPickBlockCheckDelay, &SpinBox::editDone, this, [=]() {
  204. if (ui.comboBoxPickParamType->currentIndex() == 0)//빽뤼분
  205. {
  206. m_curWaferPickParam.iBlockOrLoseDelay = ui.spinBoxPickBlockCheckDelay->value();
  207. } else if (ui.comboBoxPickParamType->currentIndex() == 1)//쑨途憩
  208. {
  209. m_curCalibPickParam.iBlockOrLoseDelay = ui.spinBoxPickBlockCheckDelay->value();
  210. }
  211. ParamChangeEvent();
  212. });
  213. connect(ui.spinBoxPickVacDelay, &SpinBox::editDone, this, [=]() {
  214. if (ui.comboBoxPickParamType->currentIndex() == 0)//빽뤼분
  215. {
  216. m_curWaferPickParam.iVacuumDelay = ui.spinBoxPickVacDelay->value();
  217. } else if (ui.comboBoxPickParamType->currentIndex() == 1)//쑨途憩
  218. {
  219. m_curCalibPickParam.iVacuumDelay = ui.spinBoxPickVacDelay->value();
  220. }
  221. ParamChangeEvent();
  222. });
  223. connect(ui.spinBoxPickBlowDelay, &SpinBox::editDone, this, [=]() {
  224. if (ui.comboBoxPickParamType->currentIndex() == 0)//빽뤼분
  225. {
  226. m_curWaferPickParam.iBlowDelay = ui.spinBoxPickBlowDelay->value();
  227. } else if (ui.comboBoxPickParamType->currentIndex() == 1)//쑨途憩
  228. {
  229. m_curCalibPickParam.iBlowDelay = ui.spinBoxPickBlowDelay->value();
  230. }
  231. ParamChangeEvent();
  232. });
  233. connect(ui.comboBoxBondParamType, &QComboBox::currentTextChanged, this, [=]() {
  234. UpdatePageBondParam();
  235. });
  236. connect(ui.checkBoxBondBlockCheck, &QCheckBox::clicked, this, [=](bool isChecked) {
  237. if (ui.comboBoxBondParamType->currentIndex() == 0)//櫓瘻憩렴쑨
  238. {
  239. m_curCalibPlaceParam.bCheckBlock = ui.checkBoxBondBlockCheck->isChecked();
  240. } else if (ui.comboBoxBondParamType->currentIndex() == 1)//미쑨憩미쑨
  241. {
  242. m_curBondParam.bCheckBlock = ui.checkBoxBondBlockCheck->isChecked();
  243. }
  244. ParamChangeEvent();
  245. });
  246. connect(ui.checkBoxBondLoseCheck, &QCheckBox::clicked, this, [=](bool isChecked) {
  247. if (ui.comboBoxBondParamType->currentIndex() == 0)//櫓瘻憩렴쑨
  248. {
  249. m_curCalibPlaceParam.bCheckLose = ui.checkBoxBondLoseCheck->isChecked();
  250. } else if (ui.comboBoxBondParamType->currentIndex() == 1)//미쑨憩미쑨
  251. {
  252. m_curBondParam.bCheckLose = ui.checkBoxBondLoseCheck->isChecked();
  253. }
  254. ParamChangeEvent();
  255. });
  256. connect(ui.checkBoxBondFindForce, &QCheckBox::clicked, this, [=](bool isChecked) {
  257. if (ui.comboBoxBondParamType->currentIndex() == 0)//櫓瘻憩렴쑨
  258. {
  259. m_curCalibPlaceParam.bFindForce = ui.checkBoxBondFindForce->isChecked();
  260. } else if (ui.comboBoxBondParamType->currentIndex() == 1)//미쑨憩미쑨
  261. {
  262. m_curBondParam.bFindForce = ui.checkBoxBondFindForce->isChecked();
  263. }
  264. ParamChangeEvent();
  265. });
  266. connect(ui.doubleSpinBoxPreBondPosZ, &DoubleSpinBox::editDone, this, [=]() {
  267. if (ui.comboBoxBondParamType->currentIndex() == 0)//櫓瘻憩렴쑨
  268. {
  269. m_curCalibPlaceParam.dPreLev = ui.doubleSpinBoxPreBondPosZ->value();
  270. } else if (ui.comboBoxBondParamType->currentIndex() == 1)//미쑨憩미쑨
  271. {
  272. m_curBondParam.dPreLev = ui.doubleSpinBoxPreBondPosZ->value();
  273. }
  274. ParamChangeEvent();
  275. });
  276. connect(ui.doubleSpinBoxBondForce, &DoubleSpinBox::editDone, this, [=]() {
  277. if (ui.comboBoxBondParamType->currentIndex() == 0)//櫓瘻憩렴쑨
  278. {
  279. m_curCalibPlaceParam.dForce = ui.doubleSpinBoxBondForce->value();
  280. } else if (ui.comboBoxBondParamType->currentIndex() == 1)//미쑨憩미쑨
  281. {
  282. m_curBondParam.dForce = ui.doubleSpinBoxBondForce->value();
  283. }
  284. ParamChangeEvent();
  285. });
  286. connect(ui.doubleSpinBoxBondPosZ, &DoubleSpinBox::editDone, this, [=]() {
  287. if (ui.comboBoxBondParamType->currentIndex() == 0)//櫓瘻憩렴쑨
  288. {
  289. m_curCalibPlaceParam.dPickOrBondLev = ui.doubleSpinBoxBondPosZ->value();
  290. } else if (ui.comboBoxBondParamType->currentIndex() == 1)//미쑨憩미쑨
  291. {
  292. m_curBondParam.dPickOrBondLev = ui.doubleSpinBoxBondPosZ->value();
  293. }
  294. ParamChangeEvent();
  295. });
  296. connect(ui.spinBoxBondGrabDelay, &SpinBox::editDone, this, [=]() {
  297. if (ui.comboBoxBondParamType->currentIndex() == 0)//櫓瘻憩렴쑨
  298. {
  299. m_curCalibPlaceParam.iGrabDelay = ui.spinBoxBondGrabDelay->value();
  300. } else if (ui.comboBoxBondParamType->currentIndex() == 1)//미쑨憩미쑨
  301. {
  302. m_curBondParam.iGrabDelay = ui.spinBoxBondGrabDelay->value();
  303. }
  304. ParamChangeEvent();
  305. });
  306. connect(ui.spinBoxBondBlockCheckDelay, &SpinBox::editDone, this, [=]() {
  307. if (ui.comboBoxBondParamType->currentIndex() == 0)//櫓瘻憩렴쑨
  308. {
  309. m_curCalibPlaceParam.iBlockOrLoseDelay = ui.spinBoxBondBlockCheckDelay->value();
  310. } else if (ui.comboBoxBondParamType->currentIndex() == 1)//미쑨憩미쑨
  311. {
  312. m_curBondParam.iBlockOrLoseDelay = ui.spinBoxBondBlockCheckDelay->value();
  313. }
  314. ParamChangeEvent();
  315. });
  316. connect(ui.spinBoxBondDelay, &SpinBox::editDone, this, [=]() {
  317. if (ui.comboBoxBondParamType->currentIndex() == 0)//櫓瘻憩렴쑨
  318. {
  319. m_curCalibPlaceParam.iPickOrBondDelay = ui.spinBoxBondDelay->value();
  320. } else if (ui.comboBoxBondParamType->currentIndex() == 1)//미쑨憩미쑨
  321. {
  322. m_curBondParam.iPickOrBondDelay = ui.spinBoxBondDelay->value();
  323. }
  324. ParamChangeEvent();
  325. });
  326. connect(ui.spinBoxBondVacDelay, &SpinBox::editDone, this, [=]() {
  327. if (ui.comboBoxBondParamType->currentIndex() == 0)//櫓瘻憩렴쑨
  328. {
  329. m_curCalibPlaceParam.iVacuumDelay = ui.spinBoxBondVacDelay->value();
  330. } else if (ui.comboBoxBondParamType->currentIndex() == 1)//미쑨憩미쑨
  331. {
  332. m_curBondParam.iVacuumDelay = ui.spinBoxBondVacDelay->value();
  333. }
  334. ParamChangeEvent();
  335. });
  336. connect(ui.spinBoxBondBlowDelay, &SpinBox::editDone, this, [=]() {
  337. if (ui.comboBoxBondParamType->currentIndex() == 0)//櫓瘻憩렴쑨
  338. {
  339. m_curCalibPlaceParam.iBlowDelay = ui.spinBoxBondBlowDelay->value();
  340. } else if (ui.comboBoxBondParamType->currentIndex() == 1)//미쑨憩미쑨
  341. {
  342. m_curBondParam.iBlowDelay = ui.spinBoxBondBlowDelay->value();
  343. }
  344. ParamChangeEvent();
  345. });
  346. }
  347. ProgrammPage::~ProgrammPage()
  348. {}
  349. void ProgrammPage::AddMatrixPage(int bondMatrixVectorIndex, int vectorIndex, PROGRAM_POINT_MATRIX_STRUCT matrixData)
  350. {
  351. int matrixNum = m_mapSubMatrixControls.size();
  352. int newMatrixID = ++matrixNum;
  353. QVector<QObject*> vecControls;
  354. QGridLayout* subGridLayout = new QGridLayout();
  355. subGridLayout->setSpacing(6);
  356. subGridLayout->setObjectName(QString::fromUtf8("subGridLayout"));
  357. QFrame* line = new QFrame();
  358. line->setFrameShape(QFrame::NoFrame); // 盧뇜칵훰움솥
  359. line->setFixedHeight(2); // �零미땍멕똑
  360. line->setStyleSheet("background-color: #C7CAEB;");
  361. ui.verticalLayout_2->addWidget(line);
  362. QLabel* labelTitle = new QLabel(this);
  363. labelTitle->setObjectName(QString::fromUtf8("labelTitle"));
  364. labelTitle->setText(tr("Sub Matrix ")+ QString::number(vectorIndex));
  365. subGridLayout->addWidget(labelTitle, 0, 0, 1, 1);
  366. vecControls.push_back(labelTitle);
  367. QLabel* labelRow = new QLabel(this);
  368. labelRow->setObjectName(QString::fromUtf8("labelRow"));
  369. labelRow->setText(tr("Row "));
  370. subGridLayout->addWidget(labelRow, 1, 0, 1, 1);
  371. vecControls.push_back(labelRow);
  372. SpinBox* spinBoxRow = new SpinBox(this);
  373. spinBoxRow->setObjectName(QString::fromUtf8("spinBoxRow"));
  374. subGridLayout->addWidget(spinBoxRow, 1, 1, 1, 1);
  375. vecControls.push_back(spinBoxRow);
  376. QLabel* labelCol = new QLabel(this);
  377. labelCol->setObjectName(QString::fromUtf8("labelCol"));
  378. labelCol->setText(tr("Cow "));
  379. subGridLayout->addWidget(labelCol, 2, 0, 1, 1);
  380. vecControls.push_back(labelCol);
  381. SpinBox* spinBoxCol = new SpinBox(this);
  382. spinBoxCol->setObjectName(QString::fromUtf8("spinBoxCol"));
  383. subGridLayout->addWidget(spinBoxCol, 2, 1, 1, 1);
  384. vecControls.push_back(spinBoxCol);
  385. QLabel* labelLeftTop = new QLabel(this);
  386. labelLeftTop->setObjectName(QString::fromUtf8("labelLeftTop"));
  387. labelLeftTop->setText(tr("Left Top Pos "));
  388. subGridLayout->addWidget(labelLeftTop, 4, 0, 1, 1);
  389. vecControls.push_back(labelLeftTop);
  390. DoubleSpinBox* doubleSpinBoxLeftTopX = new DoubleSpinBox(this);
  391. doubleSpinBoxLeftTopX->setObjectName(QString::fromUtf8("doubleSpinBoxLeftTopX"));
  392. subGridLayout->addWidget(doubleSpinBoxLeftTopX, 4, 1, 1, 1);
  393. vecControls.push_back(doubleSpinBoxLeftTopX);
  394. DoubleSpinBox* doubleSpinBoxLeftTopY = new DoubleSpinBox(this);
  395. doubleSpinBoxLeftTopY->setObjectName(QString::fromUtf8("doubleSpinBoxLeftTopY"));
  396. subGridLayout->addWidget(doubleSpinBoxLeftTopY, 4, 2, 1, 1);
  397. vecControls.push_back(doubleSpinBoxLeftTopY);
  398. QLabel* labelRightTopPos = new QLabel(this);
  399. labelRightTopPos->setObjectName(QString::fromUtf8("labelRightTopPos"));
  400. labelRightTopPos->setText(tr("Right Top Pos "));
  401. subGridLayout->addWidget(labelRightTopPos, 5, 0, 1, 1);
  402. vecControls.push_back(labelRightTopPos);
  403. DoubleSpinBox* doubleSpinBoxRightTopX = new DoubleSpinBox(this);
  404. doubleSpinBoxRightTopX->setObjectName(QString::fromUtf8("doubleSpinBoxRightTopX"));
  405. subGridLayout->addWidget(doubleSpinBoxRightTopX, 5, 1, 1, 1);
  406. vecControls.push_back(doubleSpinBoxRightTopX);
  407. DoubleSpinBox* doubleSpinBoxRightTopY = new DoubleSpinBox(this);
  408. doubleSpinBoxRightTopY->setObjectName(QString::fromUtf8("doubleSpinBoxRightTopY"));
  409. subGridLayout->addWidget(doubleSpinBoxRightTopY, 5, 2, 1, 1);
  410. vecControls.push_back(doubleSpinBoxRightTopY);
  411. QLabel* labelRightButtomPos = new QLabel(this);
  412. labelRightButtomPos->setObjectName(QString::fromUtf8("labelRightButtomPos"));
  413. labelRightButtomPos->setText(tr("Right Buttom pos"));
  414. subGridLayout->addWidget(labelRightButtomPos, 6, 0, 1, 1);
  415. vecControls.push_back(labelRightButtomPos);
  416. DoubleSpinBox* doubleSpinBoxRightButtomX = new DoubleSpinBox(this);
  417. doubleSpinBoxRightButtomX->setObjectName(QString::fromUtf8("doubleSpinBoxRightButtomX"));
  418. subGridLayout->addWidget(doubleSpinBoxRightButtomX, 6, 1, 1, 1);
  419. vecControls.push_back(doubleSpinBoxRightButtomX);
  420. DoubleSpinBox* doubleSpinBoxRightButtomY = new DoubleSpinBox(this);
  421. doubleSpinBoxRightButtomY->setObjectName(QString::fromUtf8("doubleSpinBoxRightButtomY"));
  422. subGridLayout->addWidget(doubleSpinBoxRightButtomY, 6, 2, 1, 1);
  423. vecControls.push_back(doubleSpinBoxRightTopX);
  424. QLabel* labelNoBondPts = new QLabel(this);
  425. labelNoBondPts->setObjectName(QString::fromUtf8("labelNoBondPts"));
  426. labelNoBondPts->setText(tr("No Bond Points"));
  427. subGridLayout->addWidget(labelNoBondPts, 7, 0, 1, 1);
  428. vecControls.push_back(labelNoBondPts);
  429. QLineEdit* lineEditNoBondPts = new QLineEdit(this);
  430. lineEditNoBondPts->setObjectName(QString::fromUtf8("lineEditNoBondPts"));
  431. subGridLayout->addWidget(lineEditNoBondPts, 7, 1, 1, 2);
  432. vecControls.push_back(lineEditNoBondPts);
  433. m_mapSubMatrixControls.insert(newMatrixID, vecControls);
  434. ui.verticalLayout_2->addLayout(subGridLayout);
  435. spinBoxRow->setValue(matrixData.MatrixRow);
  436. spinBoxCol->setValue(matrixData.MatrixCol);
  437. doubleSpinBoxLeftTopX->setValue(matrixData.LeftTopPoint.x);
  438. doubleSpinBoxLeftTopY->setValue(matrixData.LeftTopPoint.y);
  439. doubleSpinBoxRightTopX->setValue(matrixData.RightTopPoint.x);
  440. doubleSpinBoxRightTopY->setValue(matrixData.RightTopPoint.y);
  441. doubleSpinBoxRightButtomX->setValue(matrixData.RightBottomPoint.x);
  442. doubleSpinBoxRightButtomY->setValue(matrixData.RightBottomPoint.y);
  443. QString noBondPts = "";
  444. bool firstTime = false;
  445. for (XY_LONG_STRUCT pt : matrixData.VecNoBondPt)
  446. {
  447. if (!firstTime)
  448. {
  449. noBondPts += "(" + QString::number(pt.x) + "," + QString::number(pt.y) + ")";
  450. firstTime = true;
  451. continue;
  452. }
  453. noBondPts += ";(" + QString::number(pt.x) + "," + QString::number(pt.y) + ")";
  454. }
  455. lineEditNoBondPts->setText(noBondPts);
  456. connect(spinBoxRow, &SpinBox::editDone, this, [=]() {
  457. m_vecSubMatrixs[vectorIndex].MatrixRow = spinBoxRow->value();
  458. MatrixChangeEvent();
  459. });
  460. connect(spinBoxCol, &SpinBox::editDone, this, [=]() {
  461. m_vecSubMatrixs[vectorIndex].MatrixCol = spinBoxCol->value();
  462. MatrixChangeEvent();
  463. });
  464. connect(doubleSpinBoxLeftTopX, &DoubleSpinBox::editDone, this, [=]() {
  465. m_vecSubMatrixs[vectorIndex].LeftTopPoint.x = doubleSpinBoxLeftTopX->value();
  466. MatrixChangeEvent();
  467. });
  468. connect(doubleSpinBoxLeftTopY, &DoubleSpinBox::editDone, this, [=]() {
  469. m_vecSubMatrixs[vectorIndex].LeftTopPoint.y = doubleSpinBoxLeftTopY->value();
  470. MatrixChangeEvent();
  471. });
  472. connect(doubleSpinBoxRightTopX, &DoubleSpinBox::editDone, this, [=]() {
  473. m_vecSubMatrixs[vectorIndex].RightTopPoint.x = doubleSpinBoxRightTopX->value();
  474. MatrixChangeEvent();
  475. });
  476. connect(doubleSpinBoxRightTopY, &DoubleSpinBox::editDone, this, [=]() {
  477. m_vecSubMatrixs[vectorIndex].RightTopPoint.y = doubleSpinBoxRightTopY->value();
  478. MatrixChangeEvent();
  479. });
  480. connect(doubleSpinBoxRightButtomX, &DoubleSpinBox::editDone, this, [=]() {
  481. m_vecSubMatrixs[vectorIndex].RightBottomPoint.x = doubleSpinBoxRightButtomX->value();
  482. MatrixChangeEvent();
  483. });
  484. connect(doubleSpinBoxRightButtomY, &DoubleSpinBox::editDone, this, [=]() {
  485. m_vecSubMatrixs[vectorIndex].RightBottomPoint.y = doubleSpinBoxRightButtomY->value();
  486. MatrixChangeEvent();
  487. });
  488. connect(lineEditNoBondPts, &QLineEdit::textChanged, this, [=]() {
  489. });
  490. }
  491. void ProgrammPage::AddOutMatrixPage(int vectorIndex, PROGRAM_BOND_MATRIX_STRUCT matrixData)
  492. {
  493. int matrixNum = m_mapSubMatrixControls.size();
  494. int newMatrixID = ++matrixNum;
  495. QVector<QObject*> vecControls;
  496. QFrame* line = new QFrame();
  497. line->setFrameShape(QFrame::NoFrame); // 盧뇜칵훰움솥
  498. line->setFixedHeight(4); // �零미땍멕똑
  499. line->setStyleSheet("background-color: #C7CAEB;");
  500. ui.verticalLayout_2->addWidget(line);
  501. QGridLayout* matrixGridLayout = new QGridLayout();
  502. matrixGridLayout->setSpacing(6);
  503. matrixGridLayout->setObjectName(QString::fromUtf8("matrixGridLayout"));
  504. QLabel* labelTitle = new QLabel(this);
  505. labelTitle->setObjectName(QString::fromUtf8("labelRow"));
  506. labelTitle->setText(tr("Matrix_")+ QString::number(vectorIndex));
  507. matrixGridLayout->addWidget(labelTitle, 0, 0, 1, 1);
  508. vecControls.push_back(labelTitle);
  509. QLabel* labelRow = new QLabel(this);
  510. labelRow->setObjectName(QString::fromUtf8("labelRow"));
  511. labelRow->setText(tr("Row "));
  512. matrixGridLayout->addWidget(labelRow, 1, 0, 1, 1);
  513. vecControls.push_back(labelRow);
  514. SpinBox* spinBoxRow = new SpinBox(this);
  515. spinBoxRow->setObjectName(QString::fromUtf8("spinBoxRow"));
  516. matrixGridLayout->addWidget(spinBoxRow, 1, 1, 1, 1);
  517. vecControls.push_back(spinBoxRow);
  518. QLabel* labelCol = new QLabel(this);
  519. labelCol->setObjectName(QString::fromUtf8("labelCol"));
  520. labelCol->setText(tr("Cow "));
  521. matrixGridLayout->addWidget(labelCol, 2, 0, 1, 1);
  522. vecControls.push_back(labelCol);
  523. SpinBox* spinBoxCol = new SpinBox(this);
  524. spinBoxCol->setObjectName(QString::fromUtf8("spinBoxCol"));
  525. matrixGridLayout->addWidget(spinBoxCol, 2, 1, 1, 1);
  526. vecControls.push_back(spinBoxCol);
  527. QLabel* labelLeftTop = new QLabel(this);
  528. labelLeftTop->setObjectName(QString::fromUtf8("labelLeftTop"));
  529. labelLeftTop->setText(tr("Left Top Pos "));
  530. matrixGridLayout->addWidget(labelLeftTop, 4, 0, 1, 1);
  531. vecControls.push_back(labelLeftTop);
  532. DoubleSpinBox* doubleSpinBoxLeftTopX = new DoubleSpinBox(this);
  533. doubleSpinBoxLeftTopX->setObjectName(QString::fromUtf8("doubleSpinBoxLeftTopX"));
  534. matrixGridLayout->addWidget(doubleSpinBoxLeftTopX, 4, 1, 1, 1);
  535. vecControls.push_back(doubleSpinBoxLeftTopX);
  536. DoubleSpinBox* doubleSpinBoxLeftTopY = new DoubleSpinBox(this);
  537. doubleSpinBoxLeftTopY->setObjectName(QString::fromUtf8("doubleSpinBoxLeftTopY"));
  538. matrixGridLayout->addWidget(doubleSpinBoxLeftTopY, 4, 2, 1, 1);
  539. vecControls.push_back(doubleSpinBoxLeftTopY);
  540. QLabel* labelRightTopPos = new QLabel(this);
  541. labelRightTopPos->setObjectName(QString::fromUtf8("labelRightTopPos"));
  542. labelRightTopPos->setText(tr("Right Top Pos "));
  543. matrixGridLayout->addWidget(labelRightTopPos, 5, 0, 1, 1);
  544. vecControls.push_back(labelRightTopPos);
  545. DoubleSpinBox* doubleSpinBoxRightTopX = new DoubleSpinBox(this);
  546. doubleSpinBoxRightTopX->setObjectName(QString::fromUtf8("doubleSpinBoxRightTopX"));
  547. matrixGridLayout->addWidget(doubleSpinBoxRightTopX, 5, 1, 1, 1);
  548. vecControls.push_back(doubleSpinBoxRightTopX);
  549. DoubleSpinBox* doubleSpinBoxRightTopY = new DoubleSpinBox(this);
  550. doubleSpinBoxRightTopY->setObjectName(QString::fromUtf8("doubleSpinBoxRightTopY"));
  551. matrixGridLayout->addWidget(doubleSpinBoxRightTopY, 5, 2, 1, 1);
  552. vecControls.push_back(doubleSpinBoxRightTopY);
  553. QLabel* labelRightButtomPos = new QLabel(this);
  554. labelRightButtomPos->setObjectName(QString::fromUtf8("labelRightButtomPos"));
  555. labelRightButtomPos->setText(tr("Right Buttom pos"));
  556. matrixGridLayout->addWidget(labelRightButtomPos, 6, 0, 1, 1);
  557. vecControls.push_back(labelRightButtomPos);
  558. DoubleSpinBox* doubleSpinBoxRightButtomX = new DoubleSpinBox(this);
  559. doubleSpinBoxRightButtomX->setObjectName(QString::fromUtf8("doubleSpinBoxRightButtomX"));
  560. matrixGridLayout->addWidget(doubleSpinBoxRightButtomX, 6, 1, 1, 1);
  561. vecControls.push_back(doubleSpinBoxRightButtomX);
  562. DoubleSpinBox* doubleSpinBoxRightButtomY = new DoubleSpinBox(this);
  563. doubleSpinBoxRightButtomY->setObjectName(QString::fromUtf8("doubleSpinBoxRightButtomY"));
  564. matrixGridLayout->addWidget(doubleSpinBoxRightButtomY, 6, 2, 1, 1);
  565. vecControls.push_back(doubleSpinBoxRightTopX);
  566. QLabel* labelNoBondPts = new QLabel(this);
  567. labelNoBondPts->setObjectName(QString::fromUtf8("labelNoBondPts"));
  568. labelNoBondPts->setText(tr("No Bond Points"));
  569. matrixGridLayout->addWidget(labelNoBondPts, 7, 0, 1, 1);
  570. vecControls.push_back(labelNoBondPts);
  571. QLineEdit* lineEditNoBondPts = new QLineEdit(this);
  572. lineEditNoBondPts->setObjectName(QString::fromUtf8("lineEditNoBondPts"));
  573. matrixGridLayout->addWidget(lineEditNoBondPts, 7, 1, 1, 2);
  574. vecControls.push_back(lineEditNoBondPts);
  575. m_mapSubMatrixControls.insert(newMatrixID, vecControls);
  576. ui.verticalLayout_2->addLayout(matrixGridLayout);
  577. spinBoxRow->setValue(matrixData.BondMatrixRow);
  578. spinBoxCol->setValue(matrixData.BondMatrixCol);
  579. doubleSpinBoxLeftTopX->setValue(matrixData.LeftTopPoint.x);
  580. doubleSpinBoxLeftTopY->setValue(matrixData.LeftTopPoint.y);
  581. doubleSpinBoxRightTopX->setValue(matrixData.RightTopPoint.x);
  582. doubleSpinBoxRightTopY->setValue(matrixData.RightTopPoint.y);
  583. doubleSpinBoxRightButtomX->setValue(matrixData.RightBottomPoint.x);
  584. doubleSpinBoxRightButtomY->setValue(matrixData.RightBottomPoint.y);
  585. QString noBondPts = "";
  586. bool firstTime = false;
  587. for (XY_LONG_STRUCT pt : m_vectBondMatrixs[0].VecNoBondPt)
  588. {
  589. if (firstTime)
  590. {
  591. noBondPts += "(" + QString::number(pt.x) + "," + QString::number(pt.y) + ")";
  592. firstTime = true;
  593. continue;
  594. }
  595. noBondPts += ";(" + QString::number(pt.x) + "," + QString::number(pt.y) + ")";
  596. }
  597. lineEditNoBondPts->setText(noBondPts);
  598. connect(spinBoxRow, &SpinBox::editDone, this, [=]() {
  599. m_vectBondMatrixs[vectorIndex].BondMatrixRow = spinBoxRow->value();
  600. MatrixChangeEvent();
  601. });
  602. connect(spinBoxCol, &SpinBox::editDone, this, [=]() {
  603. m_vectBondMatrixs[vectorIndex].BondMatrixCol = spinBoxCol->value();
  604. MatrixChangeEvent();
  605. });
  606. connect(doubleSpinBoxLeftTopX, &DoubleSpinBox::editDone, this, [=]() {
  607. m_vectBondMatrixs[vectorIndex].LeftTopPoint.x = doubleSpinBoxLeftTopX->value();
  608. MatrixChangeEvent();
  609. });
  610. connect(doubleSpinBoxLeftTopY, &DoubleSpinBox::editDone, this, [=]() {
  611. m_vectBondMatrixs[vectorIndex].LeftTopPoint.y = doubleSpinBoxLeftTopY->value();
  612. MatrixChangeEvent();
  613. });
  614. connect(doubleSpinBoxRightTopX, &DoubleSpinBox::editDone, this, [=]() {
  615. m_vectBondMatrixs[vectorIndex].RightTopPoint.x = doubleSpinBoxRightTopX->value();
  616. MatrixChangeEvent();
  617. });
  618. connect(doubleSpinBoxRightTopY, &DoubleSpinBox::editDone, this, [=]() {
  619. m_vectBondMatrixs[vectorIndex].RightTopPoint.y = doubleSpinBoxRightTopY->value();
  620. MatrixChangeEvent();
  621. });
  622. connect(doubleSpinBoxRightButtomX, &DoubleSpinBox::editDone, this, [=]() {
  623. m_vectBondMatrixs[vectorIndex].RightBottomPoint.x = doubleSpinBoxRightButtomX->value();
  624. MatrixChangeEvent();
  625. });
  626. connect(doubleSpinBoxRightButtomY, &DoubleSpinBox::editDone, this, [=]() {
  627. m_vectBondMatrixs[vectorIndex].RightBottomPoint.y = doubleSpinBoxRightButtomY->value();
  628. MatrixChangeEvent();
  629. });
  630. connect(lineEditNoBondPts, &QLineEdit::textChanged, this, [=]() {
  631. });
  632. }
  633. void ProgrammPage::AddMatrixParam()
  634. {
  635. }
  636. void ProgrammPage::UpdatePageParam()
  637. {
  638. int dieSourceIndex = 0;
  639. if (m_curBondInfo.eDieSource == DIE_SOURCE::BY_WAFER)
  640. {
  641. dieSourceIndex = 1;
  642. } else if (m_curBondInfo.eDieSource == DIE_SOURCE::BY_WAFFLE)
  643. {
  644. dieSourceIndex = 0;
  645. }
  646. ui.comboBoxDieSource->setCurrentIndex(dieSourceIndex);
  647. ui.spinBoxPickTempID->setValue(m_curBondInfo.iPickPRStrategyId);
  648. ui.spinBoxPickNozzleID->setValue(m_curBondInfo.iPickHeadId);
  649. ui.spinBoxPreBondTemp->setValue(m_curBondInfo.iBondFrontPRStrategyId);
  650. ui.spinBoxPostBondTemp->setValue(m_curBondInfo.iBondBackPRStrategyId);
  651. ui.spinBoxBondTemp->setValue(m_curBondInfo.iBondPRStrategyId);
  652. ui.spinBoxLookUpTemp->setValue(m_curBondInfo.iLookUpPRStrategyId);
  653. ui.spinBoxCalibPickTemp->setValue(m_curBondInfo.iCalibPRStrategyId);
  654. ui.doubleSpinBoxBondOffsetX->setValue(m_curBondInfo.stOffset.x);
  655. ui.doubleSpinBoxBondOffsetY->setValue(m_curBondInfo.stOffset.y);
  656. ui.doubleSpinBoxBondOffsetAngle->setValue(m_curBondInfo.stOffset.a);
  657. UpdatePagePickParam();
  658. UpdatePageBondParam();
  659. }
  660. void ProgrammPage::ParamChangeEvent()
  661. {
  662. m_manageDB->GetCProduct()->SetBondInfoData(m_curBondInfo.iInfoId, m_curBondInfo);
  663. m_manageDB->GetCProduct()->SetBondParam(m_curWaferPickParam.iId, m_curWaferPickParam);
  664. m_manageDB->GetCProduct()->SetBondParam(m_curCalibPlaceParam.iId, m_curCalibPlaceParam);
  665. m_manageDB->GetCProduct()->SetBondParam(m_curCalibPickParam.iId, m_curCalibPickParam);
  666. m_manageDB->GetCProduct()->SetBondParam(m_curBondParam.iId, m_curBondParam);
  667. }
  668. void ProgrammPage::MatrixChangeEvent()
  669. {
  670. for (PROGRAM_BOND_MATRIX_STRUCT& bondMatrix : m_vectBondMatrixs)
  671. {
  672. m_manageDB->GetCProduct()->SetBondMatrix(bondMatrix.BondMatrixId, bondMatrix);
  673. }
  674. for (PROGRAM_POINT_MATRIX_STRUCT& pointMatrix : m_vecSubMatrixs)
  675. {
  676. m_manageDB->GetCProduct()->SetPointMatrix(pointMatrix.MatrixId, pointMatrix);
  677. }
  678. }
  679. void ProgrammPage::UpdatePagePickParam()
  680. {
  681. //"혤쑨庫혤쑨"
  682. if (ui.comboBoxPickParamType->currentIndex() == 0)
  683. {
  684. ui.checkBoxPickBlockCheck->setChecked(m_curWaferPickParam.bCheckBlock);
  685. ui.checkBoxPickLoseCheck->setChecked(m_curWaferPickParam.bCheckLose);
  686. ui.checkBoxPickFindForceCheck->setChecked(m_curWaferPickParam.bFindForce);
  687. ui.doubleSpinBoxPrePickZ->setValue(m_curWaferPickParam.dPreLev);
  688. ui.doubleSpinBoxPickForce->setValue(m_curWaferPickParam.dForce);
  689. ui.doubleSpinBoxPickPosZ->setValue(m_curWaferPickParam.dPickOrBondLev);
  690. ui.spinBoxPickGrabDelay->setValue(m_curWaferPickParam.iGrabDelay);
  691. ui.spinBox_PickDelay->setValue(m_curWaferPickParam.iPickOrBondDelay);
  692. ui.spinBoxPickBlockCheckDelay->setValue(m_curWaferPickParam.iBlockOrLoseDelay);
  693. ui.spinBoxPickVacDelay->setValue(m_curWaferPickParam.iVacuumDelay);
  694. ui.spinBoxPickBlowDelay->setValue(m_curWaferPickParam.iBlowDelay);
  695. }
  696. //"櫓瘻憩혤쑨"
  697. else if (ui.comboBoxPickParamType->currentIndex() == 1)
  698. {
  699. ui.checkBoxPickBlockCheck->setChecked(m_curCalibPickParam.bCheckBlock);
  700. ui.checkBoxPickLoseCheck->setChecked(m_curCalibPickParam.bCheckLose);
  701. ui.checkBoxPickFindForceCheck->setChecked(m_curCalibPickParam.bFindForce);
  702. ui.doubleSpinBoxPrePickZ->setValue(m_curCalibPickParam.dPreLev);
  703. ui.doubleSpinBoxPickForce->setValue(m_curCalibPickParam.dForce);
  704. ui.doubleSpinBoxPickPosZ->setValue(m_curCalibPickParam.dPickOrBondLev);
  705. ui.spinBoxPickGrabDelay->setValue(m_curCalibPickParam.iGrabDelay);
  706. ui.spinBox_PickDelay->setValue(m_curCalibPickParam.iPickOrBondDelay);
  707. ui.spinBoxPickBlockCheckDelay->setValue(m_curCalibPickParam.iBlockOrLoseDelay);
  708. ui.spinBoxPickVacDelay->setValue(m_curCalibPickParam.iVacuumDelay);
  709. ui.spinBoxPickBlowDelay->setValue(m_curCalibPickParam.iBlowDelay);
  710. }
  711. }
  712. void ProgrammPage::UpdatePageBondParam()
  713. {
  714. //"櫓瘻憩렴쑨"
  715. if (ui.comboBoxBondParamType->currentIndex() == 0)
  716. {
  717. ui.checkBoxBondBlockCheck->setChecked(m_curCalibPlaceParam.bCheckBlock);
  718. ui.checkBoxBondLoseCheck->setChecked(m_curCalibPlaceParam.bCheckLose);
  719. ui.checkBoxBondFindForce->setChecked(m_curCalibPlaceParam.bFindForce);
  720. ui.doubleSpinBoxPreBondPosZ->setValue(m_curCalibPlaceParam.dPreLev);
  721. ui.doubleSpinBoxBondForce->setValue(m_curCalibPlaceParam.dForce);
  722. ui.doubleSpinBoxBondPosZ->setValue(m_curCalibPlaceParam.dPickOrBondLev);
  723. ui.spinBoxBondGrabDelay->setValue(m_curCalibPlaceParam.iGrabDelay);
  724. ui.spinBoxBondDelay->setValue(m_curCalibPlaceParam.iPickOrBondDelay);
  725. ui.spinBoxBondBlockCheckDelay->setValue(m_curCalibPlaceParam.iBlockOrLoseDelay);
  726. ui.spinBoxBondVacDelay->setValue(m_curCalibPlaceParam.iVacuumDelay);
  727. ui.spinBoxBondBlowDelay->setValue(m_curCalibPlaceParam.iBlowDelay);
  728. }
  729. //"미쑨憩미쑨"
  730. else if (ui.comboBoxBondParamType->currentIndex() == 1)
  731. {
  732. ui.checkBoxBondBlockCheck->setChecked(m_curBondParam.bCheckBlock);
  733. ui.checkBoxBondLoseCheck->setChecked(m_curBondParam.bCheckLose);
  734. ui.checkBoxBondFindForce->setChecked(m_curBondParam.bFindForce);
  735. ui.doubleSpinBoxPreBondPosZ->setValue(m_curBondParam.dPreLev);
  736. ui.doubleSpinBoxBondForce->setValue(m_curBondParam.dForce);
  737. ui.doubleSpinBoxBondPosZ->setValue(m_curBondParam.dPickOrBondLev);
  738. ui.spinBoxBondGrabDelay->setValue(m_curBondParam.iGrabDelay);
  739. ui.spinBoxBondDelay->setValue(m_curBondParam.iPickOrBondDelay);
  740. ui.spinBoxBondBlockCheckDelay->setValue(m_curBondParam.iBlockOrLoseDelay);
  741. ui.spinBoxBondVacDelay->setValue(m_curBondParam.iVacuumDelay);
  742. ui.spinBoxBondBlowDelay->setValue(m_curBondParam.iBlowDelay);
  743. }
  744. }
  745. void ProgrammPage::initPage()
  746. {
  747. if (m_manageDB == nullptr)
  748. {
  749. return;
  750. }
  751. //닒빈똥삿혤鑒앴
  752. m_vectBondMatrixs = m_manageDB->GetCProduct()->GetBondMatrix();
  753. if (m_vectBondMatrixs.size() == 0)
  754. {
  755. return;
  756. }
  757. for (int i = 0; i < m_vectBondMatrixs.size(); i++)
  758. {
  759. AddOutMatrixPage(i, m_vectBondMatrixs[i]);
  760. for (int j = 0; j < m_vectBondMatrixs[i].VecPointMatrixId.size(); j++)
  761. {
  762. PROGRAM_POINT_MATRIX_STRUCT subMatrix;
  763. m_manageDB->GetCProduct()->GetPointMatrix(m_vectBondMatrixs[i].VecPointMatrixId[j], subMatrix);
  764. m_vecSubMatrixs.push_back(subMatrix);
  765. AddMatrixPage(i, j, subMatrix);
  766. }
  767. }
  768. //for (int i = 0; i < m_vectBondMatrixs[0].VecPointMatrixId.size(); ++i)
  769. //{
  770. // PROGRAM_POINT_MATRIX_STRUCT subMatrix;
  771. // m_manageDB->GetCProduct()->GetPointMatrix(m_vectBondMatrixs[0].VecPointMatrixId[i], subMatrix);
  772. // m_vecSubMatrixs.push_back(subMatrix);
  773. //}
  774. //m_manageDB->GetCProduct()->GetDieMatrix(m_vectBondMatrixs[0].VecPointMatrixId[0], m_vecSubMatrixs);
  775. //鞫刻앤黎鑒앴
  776. ui.spinBoxRow->setValue(m_vectBondMatrixs[0].BondMatrixRow);
  777. ui.spinBoxCol->setValue(m_vectBondMatrixs[0].BondMatrixCol);
  778. ui.doubleSpinBoxLeftTopX->setValue(m_vectBondMatrixs[0].LeftTopPoint.x);
  779. ui.doubleSpinBoxLeftTopY->setValue(m_vectBondMatrixs[0].LeftTopPoint.y);
  780. ui.doubleSpinBoxRightTopX->setValue(m_vectBondMatrixs[0].RightTopPoint.x);
  781. ui.doubleSpinBoxRightTopY->setValue(m_vectBondMatrixs[0].RightTopPoint.y);
  782. ui.doubleSpinBoxRightButtomX->setValue(m_vectBondMatrixs[0].RightBottomPoint.x);
  783. ui.doubleSpinBoxRightButtomY->setValue(m_vectBondMatrixs[0].RightBottomPoint.y);
  784. QString noBondPts = "";
  785. bool firstTime = false;
  786. for (XY_LONG_STRUCT& pt : m_vectBondMatrixs[0].VecNoBondPt)
  787. {
  788. if (firstTime)
  789. {
  790. noBondPts += "(" + QString::number(pt.x) + "," + QString::number(pt.y) + ")";
  791. firstTime = true;
  792. }
  793. noBondPts += ";(" + QString::number(pt.x) + "," + QString::number(pt.y) + ")";
  794. }
  795. ui.lineEditNoBondPts->setText(noBondPts);
  796. //鞫刻綾앤黎섟鑒앴
  797. //for (PROGRAM_POINT_MATRIX_STRUCT& subMatrix : m_vecSubMatrixs)
  798. //{
  799. // AddMatrixPage(subMatrix);
  800. //}
  801. //닒빈똥삿혤꽝鑒, 寧敬鑒앴
  802. CResources* pResources = CResources::GetInstance();
  803. if (pResources == nullptr)
  804. {
  805. return ;
  806. }
  807. CBondMatrix* pBondMatrix = pResources->GetBondMatrix();
  808. if (pBondMatrix == nullptr)
  809. {
  810. return ;
  811. }
  812. //pBondMatrix->GetPintInfoByIndex(0, m_curPointInfo);
  813. m_manageDB->GetCProduct()->GetBondInfoData(m_vectBondMatrixs[0].BondInfoId, m_curBondInfo);
  814. m_manageDB->GetCProduct()->GetBondParam(m_curBondInfo.iPickParamId, m_curWaferPickParam);
  815. m_manageDB->GetCProduct()->GetBondParam(m_curBondInfo.iCalibBondParamId, m_curCalibPlaceParam);
  816. m_manageDB->GetCProduct()->GetBondParam(m_curBondInfo.iCalibPickParamId, m_curCalibPickParam);
  817. m_manageDB->GetCProduct()->GetBondParam(m_curBondInfo.iBondParamId, m_curBondParam);
  818. //鞫刻썹충꽝鑒
  819. UpdatePageParam();
  820. ui.verticalLayoutWaffleMatrix->addWidget(m_pWaffleProgrammPage);
  821. }