ProgrammPage.cpp 35 KB

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