BondMatrixProgramPage.cpp 36 KB

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