12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676 |
- #include "BondMatrixProgramPage.h"
- #include "Src/RewriteControl/Controls/SpinBox.h"
- #include "Src/RewriteControl/Controls/DoubleSpinBox.h"
- #include <QPushButton>
- #include <QtWidgets/qmessagebox.h>
- #include <View/die-bonder-ui/Src/MatrixDialogs/NoBondPtEditDialog.h>
- #include <QtCore/qelapsedtimer.h>
- //#include <Module/Module/TipMatrix.cpp>
- //#include <Module/Module/Resources/database/CProduct.h>
- inline void safeSetComboBoxIndex(QComboBox* combo, int value)
- {
- combo->blockSignals(true);
- int idx = combo->findData(value);
- if (idx >= 0) {
- combo->setCurrentIndex(idx);
- }
- else {
- // 如果没找到值,保持不变或不设置任何值
- combo->setCurrentIndex(-1); // 明确不设置为第一个
- }
- combo->blockSignals(false);
- }
- BondMatrixProgramPage::BondMatrixProgramPage(QWidget* parent) :
- QWidget(parent)
- {
- QElapsedTimer timer;
- timer.start();
- ui.setupUi(this);
- qint64 elapsedTime = timer.elapsed();
- timer.start();
- ui.pushButtonSave->setProperty("type", "save");
- ui.pushButtonAddOutMatrix->setProperty("type", "addOutMatrix");
- ui.pushButtonSaveParaAs->setProperty("type", "saveParaAs");
- ui.pushButtonSavePara->setProperty("type", "savePara");
- elapsedTime = timer.elapsed();
- timer.start();
- setStyleSheet(
- "QWidget { background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #F1F4FD, stop: 1 #E5E4F6); }"
- "QDoubleSpinBox { background: #FFFFFF; border: 1px solid #BABBDC; border-radius: 6px; padding: 2px 5px; }"
- "QSpinBox { background: #FFFFFF; border: 1px solid #BABBDC; border-radius: 6px; padding: 2px 5px; }"
- "QLineEdit { background: #FFFFFF; border: 1px solid #BABBDC; border-radius: 6px; padding: 2px 5px; }"
- "QCheckBox::indicator { width: 20px; height: 20px; }"
- "QCheckBox::indicator:unchecked { background-color: #FFFFFF; border-radius: 2px; }"
- "QComboBox { background: #FFFFFF; border: 1px solid #BABBDC; border-radius: 6px; padding: 2px 5px; }"
- "QComboBox::drop-down { width: 20px; }"
- "QPushButton { background: #D0D0E8; border: 1px solid #BABBDC; border-radius: 6px; padding: 2px 5px; }" // Button background color
- "QPushButton:hover { background-color: #B0B0D8; }" // Lighter color on hover
- "QPushButton:pressed { background-color: #A0A0C8; }" // Darker color on press
- );
- elapsedTime = timer.elapsed();
- timer.start();
- ui.frame->setFrameShape(QFrame::NoFrame); // 移除默认框架
- ui.frame->setFixedHeight(2); // 设置固定高度
- ui.frame->setStyleSheet("background-color: #C7CAEB;");
- //ui.tab->setStyleSheet("background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #F1F4FD, stop: 1 #E5E4F6)");
- elapsedTime = timer.elapsed();
- timer.start();
- initPage();
- elapsedTime = timer.elapsed();
- timer.start();
- connect(ui.pushButtonSave, &QPushButton::clicked, this, [=] {
- MatrixChangeEvent();
- CBondMatrix* pBondMatrix = CResources::GetInstance()->GetBondMatrix();
- pBondMatrix->LoadMatrix(BOND_DIR::OrderAndS);
- });
- connect(ui.pushButtonAddOutMatrix, &QPushButton::clicked, this, [=]() {
- PROGRAM_BOND_MATRIX_STRUCT newMatrix;
- //排序
- std::sort(m_vectBondMatrixs.begin(), m_vectBondMatrixs.end(),
- [](const PROGRAM_BOND_MATRIX_STRUCT& a, const PROGRAM_BOND_MATRIX_STRUCT& b) {
- return a.BondMatrixId < b.BondMatrixId;
- });
- int newBondMatrixID = 0;
- UINT maxID = 0;
- // 查找最大 MatrixId
- for (PROGRAM_BOND_MATRIX_STRUCT& bondMatrix : m_vectBondMatrixs)
- {
- if (bondMatrix.BondMatrixId > maxID)
- {
- maxID = bondMatrix.BondMatrixId;
- }
- }
- newBondMatrixID = ++maxID;
- while (std::any_of(m_vectBondMatrixs.begin(), m_vectBondMatrixs.end(),
- [newBondMatrixID](const PROGRAM_BOND_MATRIX_STRUCT& bondMatrix) {
- return bondMatrix.BondMatrixId == newBondMatrixID;
- }))
- {
- newBondMatrixID++; // 如果生成的 ID 已经存在,递增直到找到唯一的 ID
- }
- newMatrix.BondMatrixId = newBondMatrixID;
- newMatrix.BondMatrixRow = 0;
- newMatrix.BondMatrixCol = 0;
- newMatrix.strModuleName = "BondHead";
- newMatrix.iModuleId = MODULE_LIST::BondHead;
- int newVectorIndex = m_vectBondMatrixs.size();
- newMatrix.BondInfoId = 1;
- //std::vector<PROGRAM_POINT_MATRIX_STRUCT> newVecSubMatrix;
- m_vectBondMatrixs.push_back(newMatrix);
- AddOutMatrixPage(newVectorIndex, newMatrix, m_vecSubMatrixs);
- //AddOutMatrixPage(0, m_vectBondMatrixs[0], m_vecSubMatrixs);
- ui.comboBoxCurrentMatrix->clear();
- for (int i = 0; i < m_vectBondMatrixs.size(); i++)
- {
- // 显示 矩阵编号
- int _bondMatrixId = m_vectBondMatrixs[i].BondMatrixId;
- QString itemText = QString::number(_bondMatrixId);
- // 将 矩阵编号 添加到下拉框
- ui.comboBoxCurrentMatrix->addItem(itemText,_bondMatrixId);
- }
- ShowCurrentMatrix(m_vectBondMatrixs[m_vectBondMatrixs.size()-1].BondMatrixId);
- });
- connect(ui.pushButtonSavePara, &QPushButton::clicked, this, [=] {
- //MatrixChangeEvent();
- ParamChangeEvent();
- CBondMatrix* pBondMatrix = CResources::GetInstance()->GetBondMatrix();
- pBondMatrix->LoadMatrix(BOND_DIR::OrderAndS);
- });
- //BondInfo SaveAs
- connect(ui.pushButtonSaveParaAs, &QPushButton::clicked, this, [=] {
- BondInfoParamSaveAsEvent();
- CBondMatrix* pBondMatrix = CResources::GetInstance()->GetBondMatrix();
- pBondMatrix->LoadMatrix(BOND_DIR::OrderAndS);
- });
- //BondInfo Delete
- connect(ui.pushButtonDeleteParam, &QPushButton::clicked, this, &BondMatrixProgramPage::onPushButtonDeleteParamClicked);
- // Param Delete
- connect(ui.pushButtonDeletePick1, &QPushButton::clicked, this, [this]() {
- onPushButtonDeleteClicked(ui.pushButtonDeletePick1, ui.comboBoxCurrentPara_Pick1);
- restorePick1DefaultStyles();
- });
- connect(ui.pushButtonDeletePick2, &QPushButton::clicked, this, [this]() {
- onPushButtonDeleteClicked(ui.pushButtonDeletePick2, ui.comboBoxCurrentPara_Pick2);
- restorePick2DefaultStyles();
- });
- connect(ui.pushButtonDeletePlace1, &QPushButton::clicked, this, [this]() {
- onPushButtonDeleteClicked(ui.pushButtonDeletePlace1, ui.comboBoxCurrentPara_Place1);
- restorePlace1DefaultStyles();
- });
- connect(ui.pushButtonDeletePlace2, &QPushButton::clicked, this, [this]() {
- onPushButtonDeleteClicked(ui.pushButtonDeletePlace2, ui.comboBoxCurrentPara_Place2);
- restorePlccle2DefaultStyles();
- });
- //Param SaveAs
- // 取晶头取晶
- connect(ui.pushButtonSaveAsPick1, &QPushButton::clicked, this, [=]() {
- ParamSaveAsEvent(m_curWaferPickParam);
- restorePick1DefaultStyles();
- });
- // 中转台取晶
- connect(ui.pushButtonSaveAsPick2, &QPushButton::clicked, this, [=]() {
- ParamSaveAsEvent(m_curCalibPickParam);
- restorePick2DefaultStyles();
- });
- // 中转台固晶
- connect(ui.pushButtonSaveAsPlace1, &QPushButton::clicked, this, [=]() {
- ParamSaveAsEvent(m_curCalibPlaceParam);
- restorePlace1DefaultStyles();
- });
- // 固晶台固晶
- connect(ui.pushButtonSaveAsPlace2, &QPushButton::clicked, this, [=]() {
- ParamSaveAsEvent(m_curBondParam);
- restorePlccle2DefaultStyles();
- });
- connect(ui.comboBoxCurrentMatrix, SIGNAL(currentIndexChanged(int)), this, SLOT(onComboBoxCurrentMatrixChanged(int)));
- connect(ui.comboBoxCurrentPara, SIGNAL(currentIndexChanged(int)), this, SLOT(onComboBoxIndexChangedForParam(int)));
- ui.comboBoxCurrentPara->installEventFilter(this);
- ui.comboBoxDieSource->installEventFilter(this);
- ui.comboBoxPickNozzleID->installEventFilter(this);
- ui.comboBoxPostBondTemp->installEventFilter(this);
- ui.comboBoxPickTempID->installEventFilter(this);
- ui.comboBoxPreBondTemp->installEventFilter(this);
- ui.comboBoxBondTemp->installEventFilter(this);
- ui.comboBoxLookUpTemp->installEventFilter(this);
- ui.comboBoxCalibPickTemp->installEventFilter(this);
- ui.comboBoxPcbAlnPRStrategyId->installEventFilter(this);
- ui.comboBoxCurrentPara_Pick1->installEventFilter(this);
- ui.comboBoxCurrentPara_Pick2->installEventFilter(this);
- ui.comboBoxCurrentPara_Place1->installEventFilter(this);
- ui.comboBoxCurrentPara_Place2->installEventFilter(this);
- ui.comboBoxBondNozzleID->installEventFilter(this);
- //参数
- // 处理 ComboBox 选择的 "Die Source"
- connect(ui.comboBoxDieSource, QOverload<int>::of(&QComboBox::currentIndexChanged), this, [=](int index) {
- if (index == 0) {
- m_curBondInfo.eDieSource = DIE_SOURCE::BY_WAFFLE;
- }
- else if (index == 1) {
- m_curBondInfo.eDieSource = DIE_SOURCE::BY_WAFER;
- }
- // 更新样式
- if (m_curBondInfo.eDieSource == m_tempBondInfo.eDieSource)
- ui.comboBoxDieSource->setStyleSheet(""); // 恢复默认样式
- else
- ui.comboBoxDieSource->setStyleSheet("color: red;"); // 字体颜色变红
- });
- // 是否中转
- connect(ui.checkBoxIsCalib, &QCheckBox::clicked, this, [=](bool isChecked) {
- m_curBondInfo.bTransferPREnable = isChecked;
- // 更新样式
- if (isChecked == m_tempBondInfo.bTransferPREnable)
- ui.checkBoxIsCalib->setStyleSheet(""); // 恢复默认样式
- else
- ui.checkBoxIsCalib->setStyleSheet("color: red;"); // 字体颜色变红
- });
- // 是否逐个固晶对点
- connect(ui.checkBoxIsAllBondAln, &QCheckBox::clicked, this, [=](bool isChecked) {
- m_curBondInfo.bAllBondAlnEnable = isChecked;
- // 更新样式
- if (isChecked == m_tempBondInfo.bAllBondAlnEnable)
- ui.checkBoxIsAllBondAln->setStyleSheet(""); // 恢复默认样式
- else
- ui.checkBoxIsAllBondAln->setStyleSheet("color: red;"); // 字体颜色变红
- });
- // 是否 PCB对点
- connect(ui.checkBoxIsPcbAln, &QCheckBox::clicked, this, [=](bool isChecked) {
- m_curBondInfo.bPcbAlnEnable = isChecked;
- // 更新样式
- if (isChecked == m_tempBondInfo.bPcbAlnEnable)
- ui.checkBoxIsPcbAln->setStyleSheet(""); // 恢复默认样式
- else
- ui.checkBoxIsPcbAln->setStyleSheet("color: red;"); // 字体颜色变红
- });
- // 处理 "Die Height" 的变化
- connect(ui.spinBoxDieHeight, &DoubleSpinBox::editDone, this, [=]() {
- m_curBondInfo.dDieHeight = ui.spinBoxDieHeight->value();
- // 更新样式
- if (m_curBondInfo.dDieHeight == m_tempBondInfo.dDieHeight)
- ui.spinBoxDieHeight->setStyleSheet(""); // 恢复默认样式
- else
- ui.spinBoxDieHeight->setStyleSheet("color: red;"); // 字体颜色变红
- });
- // 处理 "Pick Nozzle ID" 的变化
- connect(ui.comboBoxPickNozzleID, static_cast<void(QComboBox::*)(int)>(&QComboBox::currentIndexChanged), this, [=](int index) {
- if (m_isComBoxUpdating) {
- return;
- }
- m_curBondInfo.iPickHeadId = ui.comboBoxPickNozzleID->currentData().toInt();
- // 更新样式
- if (m_curBondInfo.iPickHeadId == m_tempBondInfo.iPickHeadId)
- ui.comboBoxPickNozzleID->setStyleSheet(""); // 恢复默认样式
- else
- ui.comboBoxPickNozzleID->setStyleSheet("color: red;"); // 字体颜色变红
- });
- // 处理 "Post Bond Temp" 的变化
- connect(ui.comboBoxPostBondTemp, static_cast<void(QComboBox::*)(int)>(&QComboBox::currentIndexChanged), this, [=](int index) {
- if (m_isComBoxUpdating) {
- return;
- }
- m_curBondInfo.iBondBackPRStrategyId = ui.comboBoxPostBondTemp->currentData().toInt();
- // 更新样式
- if (m_curBondInfo.iBondBackPRStrategyId == m_tempBondInfo.iBondBackPRStrategyId)
- ui.comboBoxPostBondTemp->setStyleSheet(""); // 恢复默认样式
- else
- ui.comboBoxPostBondTemp->setStyleSheet("color: red;"); // 字体颜色变红
- });
- // 处理 "Pick Temp ID" 的变化
- connect(ui.comboBoxPickTempID, static_cast<void(QComboBox::*)(int)>(&QComboBox::currentIndexChanged), this, [=](int index) {
- if (m_isComBoxUpdating) {
- return;
- }
- m_curBondInfo.iPickPRStrategyId = ui.comboBoxPickTempID->currentData().toInt();
- // 更新样式
- if (m_curBondInfo.iPickPRStrategyId == m_tempBondInfo.iPickPRStrategyId)
- ui.comboBoxPickTempID->setStyleSheet(""); // 恢复默认样式
- else
- ui.comboBoxPickTempID->setStyleSheet("color: red;"); // 字体颜色变红
- });
- // 处理 "Pre Bond Temp" 的变化
- connect(ui.comboBoxPreBondTemp, static_cast<void(QComboBox::*)(int)>(&QComboBox::currentIndexChanged), this, [=](int index) {
- if (m_isComBoxUpdating) {
- return;
- }
- m_curBondInfo.iBondFrontPRStrategyId = ui.comboBoxPreBondTemp->currentData().toInt();
- // 更新样式
- if (m_curBondInfo.iBondFrontPRStrategyId == m_tempBondInfo.iBondFrontPRStrategyId)
- ui.comboBoxPreBondTemp->setStyleSheet(""); // 恢复默认样式
- else
- ui.comboBoxPreBondTemp->setStyleSheet("color: red;"); // 字体颜色变红
- });
- // 处理 "Bond Temp" 的变化
- connect(ui.comboBoxBondTemp, static_cast<void(QComboBox::*)(int)>(&QComboBox::currentIndexChanged), this, [=](int index) {
- if (m_isComBoxUpdating) {
- return;
- }
- m_curBondInfo.iBondAlnPRStrategyId = ui.comboBoxBondTemp->currentData().toInt();
- // 更新样式
- if (m_curBondInfo.iBondAlnPRStrategyId == m_tempBondInfo.iBondAlnPRStrategyId)
- ui.comboBoxBondTemp->setStyleSheet(""); // 恢复默认样式
- else
- ui.comboBoxBondTemp->setStyleSheet("color: red;"); // 字体颜色变红
- });
- // 处理 "Look Up Temp" 的变化
- connect(ui.comboBoxLookUpTemp, static_cast<void(QComboBox::*)(int)>(&QComboBox::currentIndexChanged), this, [=](int index) {
- if (m_isComBoxUpdating) {
- return;
- }
- m_curBondInfo.iLookUpPRStrategyId = ui.comboBoxLookUpTemp->currentData().toInt();
- // 更新样式
- if (m_curBondInfo.iLookUpPRStrategyId == m_tempBondInfo.iLookUpPRStrategyId)
- ui.comboBoxLookUpTemp->setStyleSheet(""); // 恢复默认样式
- else
- ui.comboBoxLookUpTemp->setStyleSheet("color: red;"); // 字体颜色变红
- });
- // 处理 "Calib Pick Temp" 的变化
- connect(ui.comboBoxCalibPickTemp, static_cast<void(QComboBox::*)(int)>(&QComboBox::currentIndexChanged), this, [=](int index) {
- if (m_isComBoxUpdating) {
- return;
- }
- m_curBondInfo.iCalibPRStrategyId = ui.comboBoxCalibPickTemp->currentData().toInt();
- // 更新样式
- if (m_curBondInfo.iCalibPRStrategyId == m_tempBondInfo.iCalibPRStrategyId)
- ui.comboBoxCalibPickTemp->setStyleSheet(""); // 恢复默认样式
- else
- ui.comboBoxCalibPickTemp->setStyleSheet("color: red;"); // 字体颜色变红
- });
- // 处理 "PcbAlnPRStrategyId" 的变化
- connect(ui.comboBoxPcbAlnPRStrategyId, static_cast<void(QComboBox::*)(int)>(&QComboBox::currentIndexChanged), this, [=](int index) {
- if (m_isComBoxUpdating) {
- return;
- }
- m_curBondInfo.iPcbAlnPRStrategyId = ui.comboBoxPcbAlnPRStrategyId->currentData().toInt();
- // 更新样式
- if (m_curBondInfo.iPcbAlnPRStrategyId == m_tempBondInfo.iPcbAlnPRStrategyId)
- ui.comboBoxPcbAlnPRStrategyId->setStyleSheet(""); // 恢复默认样式
- else
- ui.comboBoxPcbAlnPRStrategyId->setStyleSheet("color: red;"); // 字体颜色变红
- });
- //取/固晶参数集修改
- connect(ui.comboBoxCurrentPara_Pick1, static_cast<void(QComboBox::*)(int)>(&QComboBox::currentIndexChanged), this, [=](int index) {
- if (m_isComBoxUpdating) {
- return;
- }
- m_curBondInfo.iPickParamId = ui.comboBoxCurrentPara_Pick1->currentData().toInt();
- if (m_curBondInfo.iPickParamId == m_curBondInfo.iCalibPickParamId) {
- m_curWaferPickParam = m_curCalibPickParam;
- }
- else if (m_curBondInfo.iPickParamId == m_curBondInfo.iCalibBondParamId) {
- m_curWaferPickParam = m_curCalibPlaceParam;
- }
- else if (m_curBondInfo.iPickParamId == m_curBondInfo.iBondParamId) {
- m_curWaferPickParam = m_curBondParam;
- }
- else {
- m_manageDB->GetCProduct()->GetBondParam(m_curBondInfo.iPickParamId, m_curWaferPickParam);
- }
- //m_tempWaferPickParam = m_curWaferPickParam;
- UpdatePagePick1Param();
- // 更新样式
- if (m_curBondInfo.iPickParamId == m_tempBondInfo.iPickParamId)
- ui.comboBoxCurrentPara_Pick1->setStyleSheet(""); // 恢复默认样式
- else
- ui.comboBoxCurrentPara_Pick1->setStyleSheet("color: red;"); // 字体颜色变红
- });
- connect(ui.comboBoxCurrentPara_Pick2, static_cast<void(QComboBox::*)(int)>(&QComboBox::currentIndexChanged), this, [=](int index) {
- if (m_isComBoxUpdating) {
- return;
- }
- m_curBondInfo.iCalibPickParamId = ui.comboBoxCurrentPara_Pick2->currentData().toInt();
- // 根据其他的Pick参数进行判断
- if (m_curBondInfo.iCalibPickParamId == m_curBondInfo.iPickParamId) {
- m_curCalibPickParam = m_curWaferPickParam;
- }
- else if (m_curBondInfo.iCalibPickParamId == m_curBondInfo.iCalibBondParamId) {
- m_curCalibPickParam = m_curCalibPlaceParam;
- }
- else if (m_curBondInfo.iCalibPickParamId == m_curBondInfo.iBondParamId) {
- m_curCalibPickParam = m_curBondParam;
- }
- else {
- m_manageDB->GetCProduct()->GetBondParam(m_curBondInfo.iCalibPickParamId, m_curCalibPickParam);
- }
- //UpdatePagePickPlaceParam();
- //m_tempCalibPickParam = m_curCalibPickParam;
- UpdatePagePick2Param();
- // 更新样式
- if (m_curBondInfo.iCalibPickParamId == m_tempBondInfo.iCalibPickParamId)
- ui.comboBoxCurrentPara_Pick2->setStyleSheet(""); // 恢复默认样式
- else
- ui.comboBoxCurrentPara_Pick2->setStyleSheet("color: red;"); // 字体颜色变红
- });
- connect(ui.comboBoxCurrentPara_Place1, static_cast<void(QComboBox::*)(int)>(&QComboBox::currentIndexChanged), this, [=](int index) {
- if (m_isComBoxUpdating) {
- return;
- }
- m_curBondInfo.iCalibBondParamId = ui.comboBoxCurrentPara_Place1->currentData().toInt();
- // 根据其他的Pick参数进行判断
- if (m_curBondInfo.iCalibBondParamId == m_curBondInfo.iPickParamId) {
- m_curCalibPlaceParam = m_curWaferPickParam;
- }
- else if (m_curBondInfo.iCalibBondParamId == m_curBondInfo.iCalibPickParamId) {
- m_curCalibPlaceParam = m_curCalibPickParam;
- }
- else if (m_curBondInfo.iCalibBondParamId == m_curBondInfo.iBondParamId) {
- m_curCalibPlaceParam = m_curBondParam;
- }
- else {
- m_manageDB->GetCProduct()->GetBondParam(m_curBondInfo.iCalibBondParamId, m_curCalibPlaceParam);
- }
- //UpdatePagePickPlaceParam();
- //m_tempCalibPlaceParam = m_curCalibPlaceParam;
- UpdatePageBond1Param();
- // 更新样式
- if (m_curBondInfo.iCalibBondParamId == m_tempBondInfo.iCalibBondParamId)
- ui.comboBoxCurrentPara_Place1->setStyleSheet(""); // 恢复默认样式
- else
- ui.comboBoxCurrentPara_Place1->setStyleSheet("color: red;"); // 字体颜色变红
- });
- connect(ui.comboBoxCurrentPara_Place2, static_cast<void(QComboBox::*)(int)>(&QComboBox::currentIndexChanged), this, [=](int index) {
- if (m_isComBoxUpdating) {
- return;
- }
- m_curBondInfo.iBondParamId = ui.comboBoxCurrentPara_Place2->currentData().toInt();
-
- if (m_curBondInfo.iBondParamId == m_curBondInfo.iPickParamId) {
- m_curBondParam = m_curWaferPickParam;
- }
- else if (m_curBondInfo.iBondParamId == m_curBondInfo.iCalibPickParamId) {
- m_curBondParam = m_curCalibPickParam;
- }
- else if (m_curBondInfo.iBondParamId == m_curBondInfo.iCalibBondParamId) {
- m_curBondParam = m_curCalibPlaceParam;
- }
- else {
- m_manageDB->GetCProduct()->GetBondParam(m_curBondInfo.iBondParamId, m_curBondParam);
- }
- //UpdatePagePickPlaceParam();
-
- //m_tempBondParam = m_curBondParam;
- UpdatePageBond2Param();
- // 更新样式
- if (m_curBondInfo.iBondParamId == m_tempBondInfo.iBondParamId)
- ui.comboBoxCurrentPara_Place2->setStyleSheet(""); // 恢复默认样式
- else
- ui.comboBoxCurrentPara_Place2->setStyleSheet("color: red;"); // 字体颜色变红
- });
- // Connect Modify&Create buttons to slots
- connect(ui.SetParamPickTemp, &QPushButton::clicked, this, &BondMatrixProgramPage::onSetParamPickTempClicked);
- connect(ui.SetParamPreBond, &QPushButton::clicked, this, &BondMatrixProgramPage::onSetParamPreBondClicked);
- connect(ui.SetParamPostBond, &QPushButton::clicked, this, &BondMatrixProgramPage::onSetParamPostBondClicked);
- connect(ui.SetParamBond, &QPushButton::clicked, this, &BondMatrixProgramPage::onSetParamBondClicked);
- connect(ui.SetParamLookUp, &QPushButton::clicked, this, &BondMatrixProgramPage::onSetParamLookUpClicked);
- connect(ui.SetParamCalibPick, &QPushButton::clicked, this, &BondMatrixProgramPage::onSetParamCalibPickClicked);
- connect(ui.SetParamPcbAlnPRStrategy, &QPushButton::clicked, this, &BondMatrixProgramPage::onSetParamPcbAlnPRStrategyClicked);
- connect(ui.CreatParamPickTemp, &QPushButton::clicked, this, &BondMatrixProgramPage::onCreateParamPickTempClicked);
- connect(ui.CreatParamPreBond, &QPushButton::clicked, this, &BondMatrixProgramPage::onCreateParamPreBondClicked);
- connect(ui.CreatParamPostBond, &QPushButton::clicked, this, &BondMatrixProgramPage::onCreateParamPostBondClicked);
- connect(ui.CreatParamBond, &QPushButton::clicked, this, &BondMatrixProgramPage::onCreateParamBondClicked);
- connect(ui.CreatParamLookUp, &QPushButton::clicked, this, &BondMatrixProgramPage::onCreateParamLookUpClicked);
- connect(ui.CreatParamCalibPick, &QPushButton::clicked, this, &BondMatrixProgramPage::onCreateParamCalibPickClicked);
- connect(ui.CreatParamPcbAlnPRStrategy, &QPushButton::clicked, this, &BondMatrixProgramPage::onCreatParamPcbAlnPRStrategyClicked);
- // 处理 "Bond Nozzle ID" 的变化
- connect(ui.comboBoxBondNozzleID, static_cast<void(QComboBox::*)(int)>(&QComboBox::currentIndexChanged), this, [=](int index) {
- if (m_isComBoxUpdating) {
- return;
- }
- m_curBondInfo.iBondHeadId = ui.comboBoxBondNozzleID->currentData().toInt();
- // 更新样式
- if (m_curBondInfo.iBondHeadId == m_tempBondInfo.iBondHeadId)
- ui.comboBoxBondNozzleID->setStyleSheet(""); // 恢复默认样式
- else
- ui.comboBoxBondNozzleID->setStyleSheet("color: red;"); // 字体颜色变红
- });
- // 处理 "Bond Offset X" 的变化
- connect(ui.doubleSpinBoxBondOffsetX, &DoubleSpinBox::editDone, this, [=]() {
- m_curBondInfo.stOffset.x = ui.doubleSpinBoxBondOffsetX->value();
- // 更新样式
- if (m_curBondInfo.stOffset.x == m_tempBondInfo.stOffset.x)
- ui.doubleSpinBoxBondOffsetX->setStyleSheet(""); // 恢复默认样式
- else
- ui.doubleSpinBoxBondOffsetX->setStyleSheet("color: red;"); // 字体颜色变红
- });
- // 处理 "Bond Offset Y" 的变化
- connect(ui.doubleSpinBoxBondOffsetY, &DoubleSpinBox::editDone, this, [=]() {
- m_curBondInfo.stOffset.y = ui.doubleSpinBoxBondOffsetY->value();
- // 更新样式
- if (m_curBondInfo.stOffset.y == m_tempBondInfo.stOffset.y)
- ui.doubleSpinBoxBondOffsetY->setStyleSheet(""); // 恢复默认样式
- else
- ui.doubleSpinBoxBondOffsetY->setStyleSheet("color: red;"); // 字体颜色变红
- });
- // 处理 "Bond Offset Angle" 的变化
- connect(ui.doubleSpinBoxBondOffsetAngle, &DoubleSpinBox::editDone, this, [=]() {
- m_curBondInfo.stOffset.a = ui.doubleSpinBoxBondOffsetAngle->value();
- // 更新样式
- if (m_curBondInfo.stOffset.a == m_tempBondInfo.stOffset.a)
- ui.doubleSpinBoxBondOffsetAngle->setStyleSheet(""); // 恢复默认样式
- else
- ui.doubleSpinBoxBondOffsetAngle->setStyleSheet("color: red;"); // 字体颜色变红
- });
- // 初始化取晶控件连接
- connectWaferPickControls();
- connectCalibPickControls();
- // 初始化放晶控件连接
- connectCalibPlaceControls();
- connectBondControls();
- elapsedTime = timer.elapsed();
- }
- BondMatrixProgramPage::~BondMatrixProgramPage()
- {
- }
- // 判断是否可以删除的函数
- bool BondMatrixProgramPage::canDeleteBondInfo(int selectedBondInfoId)
- {
- // 遍历数据矩阵,检查是否有任何一个矩阵引用了这个ID
- for (const auto& matrix : m_vectBondMatrixs) {
- if (matrix.BondInfoId == selectedBondInfoId) {
- return false; // 如果有引用,不能删除
- }
- }
- return true; // 如果没有引用,允许删除
- }
- void BondMatrixProgramPage::onPushButtonDeleteParamClicked()
- {
- // 获取当前选中的ID
- int selectedId = ui.comboBoxCurrentPara->currentData().toInt();
- // 遍历数据矩阵,检查是否有任何一个矩阵引用了这个ID
- bool canDelete = canDeleteBondInfo(selectedId);
- // 根据是否能删除来决定删除操作
- if (canDelete) {
- // 执行删除操作:删除 m_vecBondInfoData 中对应的元素
- for (int i = 0; i < m_vecBondInfoData.size(); ++i) {
- if (selectedId == m_vecBondInfoData[i].iInfoId) {
- m_vecBondInfoData.erase(m_vecBondInfoData.begin() + i); // 从数据中删除
- break; // 删除成功后退出循环
- }
- }
- m_manageDB->GetCProduct()->DeleteBondInfoData(selectedId);
- // 更新 comboBox:从 comboBox 中移除对应的项
- for (int i = 0; i < ui.comboBoxCurrentPara->count(); ++i) {
- if (ui.comboBoxCurrentPara->itemData(i).toInt() == selectedId) {
- ui.comboBoxCurrentPara->removeItem(i); // 从下拉框中移除
- break;
- }
- }
- }
- else {
- // 提示用户该ID被引用,不能删除
- QMessageBox::warning(this, "警告", "该参数ID已被引用,无法删除!");
- }
- int iMatrix = ui.comboBoxCurrentMatrix->currentData().toInt();
- int iInfoId = -1;
- for (const auto& matrix : m_vectBondMatrixs) {
- if (matrix.BondMatrixId == iMatrix) {
- iInfoId = matrix.BondInfoId;
- break;
- }
- }
- ui.comboBoxCurrentPara->setCurrentIndex(ui.comboBoxCurrentPara->findData(iInfoId)); // 设置默认项
- // 动态更新删除按钮的状态
- canDelete = canDeleteBondInfo(iInfoId);
- updateDeleteButtonStatus(canDelete, ui.pushButtonDeleteParam);
- updateFourParamDeleteButtonStatus();
- }
- //判断使用次数:0没有被使用,1自己使用,>=1 多个使用
- int BondMatrixProgramPage::canDeleteParameter(int selectedId)
- {
- int referenceCount = 0;
- // 遍历 m_vecBondInfoData,检查是否有任何一个元素引用了 selectedId
- for (const auto& bondInfo : m_vecBondInfoData) {
- if (bondInfo.iPickParamId == selectedId) {
- //return false; // 如果有引用,不能删除
- referenceCount++;
- }
- if (bondInfo.iCalibPickParamId == selectedId) {
- //return false; // 如果有引用,不能删除
- referenceCount++;
- }
- if (bondInfo.iCalibBondParamId == selectedId) {
- //return false; // 如果有引用,不能删除
- referenceCount++;
- }
- if (bondInfo.iBondParamId == selectedId) {
- //return false; // 如果有引用,不能删除
- referenceCount++;
- }
- }
- return referenceCount;// <= 1;如果<=1则说明只有自己或者没有引用,则可以删除
- }
- bool BondMatrixProgramPage::deleteParameter(QPushButton* deleteButton, int selectedId)
- {
- // 判断是否可以删除
- int canDelete = canDeleteParameter(selectedId);
- if (canDelete <= 1) {
- m_manageDB->GetCProduct()->DeleteBondParam(selectedId);
- m_vecBondInfoData = m_manageDB->GetCProduct()->GetAllBondInfoData();
- for (auto it = m_vecParam.begin(); it != m_vecParam.end(); ++it)
- {
- if (it->iId == selectedId)
- {
- m_vecParam.erase(it);
- break;
- }
- }
- m_isComBoxUpdating = true;
- // 从所有comboBox中移除对应项
- for (int i = 0; i < ui.comboBoxCurrentPara_Pick1->count(); ++i) {
- if (ui.comboBoxCurrentPara_Pick1->itemData(i).toInt() == selectedId) {
- ui.comboBoxCurrentPara_Pick1->removeItem(i);
- break;
- }
- }
- for (int i = 0; i < ui.comboBoxCurrentPara_Pick2->count(); ++i) {
- if (ui.comboBoxCurrentPara_Pick2->itemData(i).toInt() == selectedId) {
- ui.comboBoxCurrentPara_Pick2->removeItem(i);
- break;
- }
- }
- for (int i = 0; i < ui.comboBoxCurrentPara_Place1->count(); ++i) {
- if (ui.comboBoxCurrentPara_Place1->itemData(i).toInt() == selectedId) {
- ui.comboBoxCurrentPara_Place1->removeItem(i);
- break;
- }
- }
- for (int i = 0; i < ui.comboBoxCurrentPara_Place2->count(); ++i) {
- if (ui.comboBoxCurrentPara_Place2->itemData(i).toInt() == selectedId) {
- ui.comboBoxCurrentPara_Place2->removeItem(i);
- break;
- }
- }
- m_isComBoxUpdating = false;
- return true;
- }
- else {
- //QMessageBox::warning(this, "警告", "该参数ID已被引用,无法删除!");
- return false;
- }
- }
- //// 对应按钮按下时的槽函数:暂时弃用
- //void BondMatrixProgramPage::on_pushButtonDeletePick1_clicked(QPushButton* deleteButton, QComboBox* comboBox)
- //{
- // // 获取 Pick1 下拉框的选中项ID
- // int selectedId = ui.comboBoxCurrentPara_Pick1->currentData().toInt();
- // deleteParameter(deleteButton, selectedId); // 调用删除函数
- //}
- //
- //void BondMatrixProgramPage::on_pushButtonDeletePick2_clicked(QPushButton* deleteButton, QComboBox* comboBox)
- //{
- // // 获取 Pick2 下拉框的选中项ID
- // int selectedId = ui.comboBoxCurrentPara_Pick2->currentData().toInt();
- // deleteParameter(deleteButton, selectedId); // 调用删除函数
- //}
- //
- //void BondMatrixProgramPage::on_pushButtonDeletePlace1_clicked(QPushButton* deleteButton, QComboBox* comboBox)
- //{
- // // 获取 Place1 下拉框的选中项ID
- // int selectedId = ui.comboBoxCurrentPara_Place1->currentData().toInt();
- // deleteParameter(deleteButton, selectedId); // 调用删除函数
- //}
- //
- //void BondMatrixProgramPage::on_pushButtonDeletePlace2_clicked(QPushButton* deleteButton, QComboBox* comboBox)
- //{
- // // 获取 Place2 下拉框的选中项ID
- // int selectedId = ui.comboBoxCurrentPara_Place2->currentData().toInt();
- // deleteParameter(deleteButton, selectedId); // 调用删除函数
- //}
- // 通用的删除槽函数
- void BondMatrixProgramPage::onPushButtonDeleteClicked(QPushButton* deleteButton, QComboBox* comboBox)
- {
- // 获取选中的 ID
- int selectedId = comboBox->currentData().toInt();
- // 调用删除函数
- if (!deleteParameter(deleteButton, selectedId)) {
- return;
- }
- int canDelete = canDeleteParameter(selectedId);
- if (canDelete == 1) //此参数机只有当前参数引用
- {
- // 删除成功后设置 comboBox 为第一个选项,若没有选项则 设置为空:一般不会为空
- if (comboBox->count() > 0) {
- comboBox->setCurrentIndex(0);
- }
- else {
- comboBox->setCurrentIndex(-1);
- }
- }
- else if (canDelete == 0)//此参数机没有任何引用
- {
- // 判断 deleteButton 是哪个按钮,执行不同的操作
- if (deleteButton == ui.pushButtonDeletePick1) {
- safeSetComboBoxIndex(ui.comboBoxCurrentPara_Pick1, m_tempBondInfo.iPickParamId);
- }
- else if (deleteButton == ui.pushButtonDeletePick2) {
- safeSetComboBoxIndex(ui.comboBoxCurrentPara_Pick2, m_tempBondInfo.iCalibPickParamId);
- }
- else if (deleteButton == ui.pushButtonDeletePlace1) {
- safeSetComboBoxIndex(ui.comboBoxCurrentPara_Place1, m_tempBondInfo.iCalibBondParamId);
- }
- else if (deleteButton == ui.pushButtonDeletePlace2) {
- safeSetComboBoxIndex(ui.comboBoxCurrentPara_Place2, m_tempBondInfo.iBondParamId);
- }
- }
- else {
- return;
- }
- selectedId = comboBox->currentData().toInt();
- canDelete = canDeleteParameter(selectedId);
- updateDeleteButtonStatus(canDelete <= 1, deleteButton);
- }
- void BondMatrixProgramPage::updateFourParamDeleteButtonStatus()
- {
- // 处理 Pick1 的删除按钮
- int selectedIdPick1 = ui.comboBoxCurrentPara_Pick1->currentData().toInt();
- bool canDeletePick1 = canDeleteParameter(selectedIdPick1) <= 1;
- updateDeleteButtonStatus(canDeletePick1, ui.pushButtonDeletePick1);
- // 处理 Pick2 的删除按钮
- int selectedIdPick2 = ui.comboBoxCurrentPara_Pick2->currentData().toInt();
- bool canDeletePick2 = canDeleteParameter(selectedIdPick2) <= 1;
- updateDeleteButtonStatus(canDeletePick2, ui.pushButtonDeletePick2);
- // 处理 Place1 的删除按钮
- int selectedIdPlace1 = ui.comboBoxCurrentPara_Place1->currentData().toInt();
- bool canDeletePlace1 = canDeleteParameter(selectedIdPlace1) <= 1;
- updateDeleteButtonStatus(canDeletePlace1, ui.pushButtonDeletePlace1);
- // 处理 Place2 的删除按钮
- int selectedIdPlace2 = ui.comboBoxCurrentPara_Place2->currentData().toInt();
- bool canDeletePlace2 = canDeleteParameter(selectedIdPlace2) <= 1;
- updateDeleteButtonStatus(canDeletePlace2, ui.pushButtonDeletePlace2);
- }
- void BondMatrixProgramPage::updateDeleteButtonStatus(bool canDelete, QPushButton* deleteButton)
- {
- deleteButton->setEnabled(canDelete);
- if (canDelete) {
- deleteButton->setStyleSheet(""); // 使用默认样式
- }
- else {
- // 更浅的灰色背景 + 深色文字,提升对比度
- deleteButton->setStyleSheet("background-color: #d3d3d3; color: #333333;");
- }
- }
- // 同步相同 iId 的参数
- void BondMatrixProgramPage::syncParamWithSameId(ns_db::PICKBOND_PARAM_STRUCT& currentParam, ns_db::PICKBOND_PARAM_STRUCT& targetParam, QWidget* targetWidget)
- {
- if (currentParam.iId == targetParam.iId) {
- targetParam = currentParam; // 同步参数值
- if (auto checkBox = qobject_cast<QCheckBox*>(targetWidget)) {
- checkBox->setChecked(targetParam.bCheckBlock);
- }
- if (auto doubleSpinBox = qobject_cast<QDoubleSpinBox*>(targetWidget)) {
- if (targetWidget == ui.doubleSpinBoxPrePickZ || targetWidget == ui.doubleSpinBoxPickForce || targetWidget == ui.doubleSpinBoxPickPosZ) {
- doubleSpinBox->setValue(targetParam.dPreLevOffset);
- }
- }
- if (auto spinBox = qobject_cast<QSpinBox*>(targetWidget)) {
- spinBox->setValue(targetParam.iGrabDelay);
- }
- }
- }
- // 取晶头取晶参数连接
- void BondMatrixProgramPage::connectWaferPickControls()
- {
- connect(ui.checkBoxPickBlockCheck, &QCheckBox::clicked, this, [=](bool isChecked) {
- m_curWaferPickParam.bCheckBlock = ui.checkBoxPickBlockCheck->isChecked();
- if (m_curWaferPickParam.bCheckBlock == m_tempWaferPickParam.bCheckBlock) {
- ui.checkBoxPickBlockCheck->setStyleSheet(""); // 恢复默认样式
- }
- else {
- ui.checkBoxPickBlockCheck->setStyleSheet("color: red;"); // 字体颜色变红
- }
- if (m_curCalibPickParam.iId == m_curWaferPickParam.iId) {
- m_curCalibPickParam.bCheckBlock = ui.checkBoxPickBlockCheck->isChecked();
- ui.checkBoxPickBlockCheck_2->setChecked(m_curCalibPickParam.bCheckBlock);
- if (m_curCalibPickParam.bCheckBlock == m_tempCalibPickParam.bCheckBlock) {
- ui.checkBoxPickBlockCheck_2->setStyleSheet(""); // 恢复默认样式
- }
- else {
- ui.checkBoxPickBlockCheck_2->setStyleSheet("color: red;"); // 字体颜色变红
- }
- }
- if (m_curCalibPlaceParam.iId == m_curWaferPickParam.iId) {
- m_curCalibPlaceParam.bCheckBlock = ui.checkBoxPickBlockCheck->isChecked();
- ui.checkBoxBondBlockCheck->setChecked(m_curCalibPlaceParam.bCheckBlock);
- if (m_curCalibPlaceParam.bCheckBlock == m_tempCalibPlaceParam.bCheckBlock) {
- ui.checkBoxBondBlockCheck->setStyleSheet(""); // 恢复默认样式
- }
- else {
- ui.checkBoxBondBlockCheck->setStyleSheet("color: red;"); // 字体颜色变红
- }
- }
- if (m_curBondParam.iId == m_curWaferPickParam.iId) {
- m_curBondParam.bCheckBlock = ui.checkBoxPickBlockCheck->isChecked();
- ui.checkBoxBondBlockCheck_2->setChecked(m_curBondParam.bCheckBlock);
- if (m_curBondParam.bCheckBlock == m_tempBondParam.bCheckBlock) {
- ui.checkBoxBondBlockCheck_2->setStyleSheet(""); // 恢复默认样式
- }
- else {
- ui.checkBoxBondBlockCheck_2->setStyleSheet("color: red;"); // 字体颜色变红
- }
- }
- });
- connect(ui.checkBoxPickLoseCheck, &QCheckBox::clicked, this, [=](bool isChecked) {
- m_curWaferPickParam.bCheckLose = ui.checkBoxPickLoseCheck->isChecked();
- if (m_curWaferPickParam.bCheckLose == m_tempWaferPickParam.bCheckLose) {
- ui.checkBoxPickLoseCheck->setStyleSheet(""); // 恢复默认样式
- }
- else {
- ui.checkBoxPickLoseCheck->setStyleSheet("color: red;"); // 字体颜色变红
- }
- if (m_curCalibPickParam.iId == m_curWaferPickParam.iId) {
- m_curCalibPickParam.bCheckLose = ui.checkBoxPickLoseCheck->isChecked();
- ui.checkBoxPickLoseCheck_2->setChecked(m_curCalibPickParam.bCheckLose);
- if (m_curCalibPickParam.bCheckLose == m_tempCalibPickParam.bCheckLose) {
- ui.checkBoxPickLoseCheck_2->setStyleSheet(""); // 恢复默认样式
- }
- else {
- ui.checkBoxPickLoseCheck_2->setStyleSheet("color: red;"); // 字体颜色变红
- }
- }
- if (m_curCalibPlaceParam.iId == m_curWaferPickParam.iId) {
- m_curCalibPlaceParam.bCheckLose = ui.checkBoxPickLoseCheck->isChecked();
- ui.checkBoxBondLoseCheck->setChecked(m_curCalibPlaceParam.bCheckLose);
- if (m_curCalibPlaceParam.bCheckLose == m_tempCalibPlaceParam.bCheckLose) {
- ui.checkBoxBondLoseCheck->setStyleSheet(""); // 恢复默认样式
- }
- else {
- ui.checkBoxBondLoseCheck->setStyleSheet("color: red;"); // 字体颜色变红
- }
- }
- if (m_curBondParam.iId == m_curWaferPickParam.iId) {
- m_curBondParam.bCheckLose = ui.checkBoxPickLoseCheck->isChecked();
- ui.checkBoxBondLoseCheck_2->setChecked(m_curBondParam.bCheckLose);
- if (m_curBondParam.bCheckLose == m_tempBondParam.bCheckLose) {
- ui.checkBoxBondLoseCheck_2->setStyleSheet(""); // 恢复默认样式
- }
- else {
- ui.checkBoxBondLoseCheck_2->setStyleSheet("color: red;"); // 字体颜色变红
- }
- }
- });
- connect(ui.checkBoxPickFindForceCheck, &QCheckBox::clicked, this, [=](bool isChecked) {
- m_curWaferPickParam.bFindForce = ui.checkBoxPickFindForceCheck->isChecked();
- if (m_curWaferPickParam.bFindForce == m_tempWaferPickParam.bFindForce) {
- ui.checkBoxPickFindForceCheck->setStyleSheet(""); // 恢复默认样式
- }
- else {
- ui.checkBoxPickFindForceCheck->setStyleSheet("color: red;"); // 字体颜色变红
- }
- ui.doubleSpinBoxPickPosZ->setEnabled(!isChecked);
- if (m_curCalibPickParam.iId == m_curWaferPickParam.iId) {
- m_curCalibPickParam.bFindForce = ui.checkBoxPickFindForceCheck->isChecked();
- ui.checkBoxPickFindForceCheck_2->setChecked(m_curCalibPickParam.bFindForce);
- if (m_curCalibPickParam.bFindForce == m_tempCalibPickParam.bFindForce) {
- ui.checkBoxPickFindForceCheck_2->setStyleSheet(""); // 恢复默认样式
- }
- else {
- ui.checkBoxPickFindForceCheck_2->setStyleSheet("color: red;"); // 字体颜色变红
- }
- ui.doubleSpinBoxPickPosZ_2->setEnabled(!isChecked);
- }
- if (m_curCalibPlaceParam.iId == m_curWaferPickParam.iId) {
- m_curCalibPlaceParam.bFindForce = ui.checkBoxPickFindForceCheck->isChecked();
- ui.checkBoxBondFindForce->setChecked(m_curCalibPlaceParam.bFindForce);
- if (m_curCalibPlaceParam.bFindForce == m_tempCalibPlaceParam.bFindForce) {
- ui.checkBoxBondFindForce->setStyleSheet(""); // 恢复默认样式
- }
- else {
- ui.checkBoxBondFindForce->setStyleSheet("color: red;"); // 字体颜色变红
- }
- ui.doubleSpinBoxBondPosZ->setEnabled(!isChecked);
- }
- if (m_curBondParam.iId == m_curWaferPickParam.iId) {
- m_curBondParam.bFindForce = ui.checkBoxPickFindForceCheck->isChecked();
- ui.checkBoxBondFindForce_2->setChecked(m_curBondParam.bFindForce);
- if (m_curBondParam.bFindForce == m_tempBondParam.bFindForce) {
- ui.checkBoxBondFindForce_2->setStyleSheet(""); // 恢复默认样式
- }
- else {
- ui.checkBoxBondFindForce_2->setStyleSheet("color: red;"); // 字体颜色变红
- }
- ui.doubleSpinBoxBondPosZ_2->setEnabled(!isChecked);
- }
- });
- connect(ui.doubleSpinBoxPrePickZ, &DoubleSpinBox::editDone, this, [=]() {
- m_curWaferPickParam.dPreLevOffset = ui.doubleSpinBoxPrePickZ->value();
- // 颜色变红显示变化
- if (m_curWaferPickParam.dPreLevOffset == m_tempWaferPickParam.dPreLevOffset)
- ui.doubleSpinBoxPrePickZ->setStyleSheet(""); // 恢复默认样式
- else
- ui.doubleSpinBoxPrePickZ->setStyleSheet("color: red;"); // 字体颜色变红
- // 如果有同步需求,添加类似的代码
- if (m_curCalibPickParam.iId == m_curWaferPickParam.iId) {
- m_curCalibPickParam.dPreLevOffset = ui.doubleSpinBoxPrePickZ->value();
- ui.doubleSpinBoxPrePickZ_2->setValue(m_curCalibPickParam.dPreLevOffset);
- if (m_curCalibPickParam.dPreLevOffset == m_tempCalibPickParam.dPreLevOffset)
- ui.doubleSpinBoxPrePickZ_2->setStyleSheet(""); // 恢复默认样式
- else
- ui.doubleSpinBoxPrePickZ_2->setStyleSheet("color: red;"); // 字体颜色变红
- }
- if (m_curCalibPlaceParam.iId == m_curWaferPickParam.iId) {
- m_curCalibPlaceParam.dPreLevOffset = ui.doubleSpinBoxPrePickZ->value();
- ui.doubleSpinBoxPreBondPosZ->setValue(m_curCalibPlaceParam.dPreLevOffset);
- if (m_curCalibPlaceParam.dPreLevOffset == m_tempCalibPlaceParam.dPreLevOffset)
- ui.doubleSpinBoxPreBondPosZ->setStyleSheet(""); // 恢复默认样式
- else
- ui.doubleSpinBoxPreBondPosZ->setStyleSheet("color: red;"); // 字体颜色变红
- }
- if (m_curBondParam.iId == m_curWaferPickParam.iId) {
- m_curBondParam.dPreLevOffset = ui.doubleSpinBoxPrePickZ->value();
- ui.doubleSpinBoxPreBondPosZ_2->setValue(m_curBondParam.dPreLevOffset);
- if (m_curBondParam.dPreLevOffset == m_tempBondParam.dPreLevOffset)
- ui.doubleSpinBoxPreBondPosZ_2->setStyleSheet(""); // 恢复默认样式
- else
- ui.doubleSpinBoxPreBondPosZ_2->setStyleSheet("color: red;"); // 字体颜色变红
- }
- });
- connect(ui.doubleSpinBoxPickForce, &DoubleSpinBox::editDone, this, [=]() {
- m_curWaferPickParam.dForce = ui.doubleSpinBoxPickForce->value();
- // 颜色变红显示变化
- if (m_curWaferPickParam.dForce == m_tempWaferPickParam.dForce)
- ui.doubleSpinBoxPickForce->setStyleSheet(""); // 恢复默认样式
- else
- ui.doubleSpinBoxPickForce->setStyleSheet("color: red;"); // 字体颜色变红
- // 如果有同步需求,添加类似的代码
- if (m_curCalibPickParam.iId == m_curWaferPickParam.iId) {
- m_curCalibPickParam.dForce = ui.doubleSpinBoxPickForce->value();
- ui.doubleSpinBoxPickForce_2->setValue(m_curCalibPickParam.dForce);
- if (m_curCalibPickParam.dForce == m_tempCalibPickParam.dForce)
- ui.doubleSpinBoxPickForce_2->setStyleSheet(""); // 恢复默认样式
- else
- ui.doubleSpinBoxPickForce_2->setStyleSheet("color: red;"); // 字体颜色变红
- }
- if (m_curCalibPlaceParam.iId == m_curWaferPickParam.iId) {
- m_curCalibPlaceParam.dForce = ui.doubleSpinBoxPickForce->value();
- ui.doubleSpinBoxBondForce->setValue(m_curCalibPlaceParam.dForce);
- if (m_curCalibPlaceParam.dForce == m_tempCalibPlaceParam.dForce)
- ui.doubleSpinBoxBondForce->setStyleSheet(""); // 恢复默认样式
- else
- ui.doubleSpinBoxBondForce->setStyleSheet("color: red;"); // 字体颜色变红
- }
- if (m_curBondParam.iId == m_curWaferPickParam.iId) {
- m_curBondParam.dForce = ui.doubleSpinBoxPickForce->value();
- ui.doubleSpinBoxBondForce_2->setValue(m_curBondParam.dForce);
- if (m_curBondParam.dForce == m_tempBondParam.dForce)
- ui.doubleSpinBoxBondForce_2->setStyleSheet(""); // 恢复默认样式
- else
- ui.doubleSpinBoxBondForce_2->setStyleSheet("color: red;"); // 字体颜色变红
- }
- });
- connect(ui.doubleSpinBoxPickPosZ, &DoubleSpinBox::editDone, this, [=]() {
- m_curWaferPickParam.dWorkLevOffset = ui.doubleSpinBoxPickPosZ->value();
- // 颜色变红显示变化
- if (m_curWaferPickParam.dWorkLevOffset == m_tempWaferPickParam.dWorkLevOffset)
- ui.doubleSpinBoxPickPosZ->setStyleSheet(""); // 恢复默认样式
- else
- ui.doubleSpinBoxPickPosZ->setStyleSheet("color: red;"); // 字体颜色变红
- // 如果有同步需求,添加类似的代码
- if (m_curCalibPickParam.iId == m_curWaferPickParam.iId) {
- m_curCalibPickParam.dWorkLevOffset = ui.doubleSpinBoxPickPosZ->value();
- ui.doubleSpinBoxPickPosZ_2->setValue(m_curCalibPickParam.dWorkLevOffset);
- if (m_curCalibPickParam.dWorkLevOffset == m_tempCalibPickParam.dWorkLevOffset)
- ui.doubleSpinBoxPickPosZ_2->setStyleSheet(""); // 恢复默认样式
- else
- ui.doubleSpinBoxPickPosZ_2->setStyleSheet("color: red;"); // 字体颜色变红
- }
- if (m_curCalibPlaceParam.iId == m_curWaferPickParam.iId) {
- m_curCalibPlaceParam.dWorkLevOffset = ui.doubleSpinBoxPickPosZ->value();
- ui.doubleSpinBoxBondPosZ->setValue(m_curCalibPlaceParam.dWorkLevOffset);
- if (m_curCalibPlaceParam.dWorkLevOffset == m_tempCalibPlaceParam.dWorkLevOffset)
- ui.doubleSpinBoxBondPosZ->setStyleSheet(""); // 恢复默认样式
- else
- ui.doubleSpinBoxBondPosZ->setStyleSheet("color: red;"); // 字体颜色变红
- }
- if (m_curBondParam.iId == m_curWaferPickParam.iId) {
- m_curBondParam.dWorkLevOffset = ui.doubleSpinBoxPickPosZ->value();
- ui.doubleSpinBoxBondPosZ_2->setValue(m_curBondParam.dWorkLevOffset);
- if (m_curBondParam.dWorkLevOffset == m_tempBondParam.dWorkLevOffset)
- ui.doubleSpinBoxBondPosZ_2->setStyleSheet(""); // 恢复默认样式
- else
- ui.doubleSpinBoxBondPosZ_2->setStyleSheet("color: red;"); // 字体颜色变红
- }
- });
- connect(ui.spinBoxPickGrabDelay, &SpinBox::editDone, this, [=]() {
- m_curWaferPickParam.iGrabDelay = ui.spinBoxPickGrabDelay->value();
- // 颜色变红显示变化
- if (m_curWaferPickParam.iGrabDelay == m_tempWaferPickParam.iGrabDelay)
- ui.spinBoxPickGrabDelay->setStyleSheet(""); // 恢复默认样式
- else
- ui.spinBoxPickGrabDelay->setStyleSheet("color: red;"); // 字体颜色变红
- // 如果有同步需求,添加类似的代码
- if (m_curCalibPickParam.iId == m_curWaferPickParam.iId) {
- m_curCalibPickParam.iGrabDelay = ui.spinBoxPickGrabDelay->value();
- ui.spinBoxPickGrabDelay_2->setValue(m_curCalibPickParam.iGrabDelay);
- if (m_curCalibPickParam.iGrabDelay == m_tempCalibPickParam.iGrabDelay)
- ui.spinBoxPickGrabDelay_2->setStyleSheet(""); // 恢复默认样式
- else
- ui.spinBoxPickGrabDelay_2->setStyleSheet("color: red;"); // 字体颜色变红
- }
- if (m_curCalibPlaceParam.iId == m_curWaferPickParam.iId) {
- m_curCalibPlaceParam.iGrabDelay = ui.spinBoxPickGrabDelay->value();
- ui.spinBoxBondGrabDelay->setValue(m_curCalibPlaceParam.iGrabDelay);
- if (m_curCalibPlaceParam.iGrabDelay == m_tempCalibPlaceParam.iGrabDelay)
- ui.spinBoxBondGrabDelay->setStyleSheet(""); // 恢复默认样式
- else
- ui.spinBoxBondGrabDelay->setStyleSheet("color: red;"); // 字体颜色变红
- }
- if (m_curBondParam.iId == m_curWaferPickParam.iId) {
- m_curBondParam.iGrabDelay = ui.spinBoxPickGrabDelay->value();
- ui.spinBoxBondGrabDelay_2->setValue(m_curBondParam.iGrabDelay);
- if (m_curBondParam.iGrabDelay == m_tempBondParam.iGrabDelay)
- ui.spinBoxBondGrabDelay_2->setStyleSheet(""); // 恢复默认样式
- else
- ui.spinBoxBondGrabDelay_2->setStyleSheet("color: red;"); // 字体颜色变红
- }
- });
- connect(ui.spinBoxPickDelay, &SpinBox::editDone, this, [=]() {
- m_curWaferPickParam.iPickOrBondDelay = ui.spinBoxPickDelay->value();
- // 颜色变红显示变化
- if (m_curWaferPickParam.iPickOrBondDelay == m_tempWaferPickParam.iPickOrBondDelay)
- ui.spinBoxPickDelay->setStyleSheet(""); // 恢复默认样式
- else
- ui.spinBoxPickDelay->setStyleSheet("color: red;"); // 字体颜色变红
- // 如果有同步需求,添加类似的代码
- if (m_curCalibPickParam.iId == m_curWaferPickParam.iId) {
- m_curCalibPickParam.iPickOrBondDelay = ui.spinBoxPickDelay->value();
- ui.spinBoxPickDelay_2->setValue(m_curCalibPickParam.iPickOrBondDelay);
- if (m_curCalibPickParam.iPickOrBondDelay == m_tempCalibPickParam.iPickOrBondDelay)
- ui.spinBoxPickDelay_2->setStyleSheet(""); // 恢复默认样式
- else
- ui.spinBoxPickDelay_2->setStyleSheet("color: red;"); // 字体颜色变红
- }
- if (m_curCalibPlaceParam.iId == m_curWaferPickParam.iId) {
- m_curCalibPlaceParam.iPickOrBondDelay = ui.spinBoxPickDelay->value();
- ui.spinBoxBondDelay->setValue(m_curCalibPlaceParam.iPickOrBondDelay);
- if (m_curCalibPlaceParam.iPickOrBondDelay == m_tempCalibPlaceParam.iPickOrBondDelay)
- ui.spinBoxBondDelay->setStyleSheet(""); // 恢复默认样式
- else
- ui.spinBoxBondDelay->setStyleSheet("color: red;"); // 字体颜色变红
- }
- if (m_curBondParam.iId == m_curWaferPickParam.iId) {
- m_curBondParam.iPickOrBondDelay = ui.spinBoxPickDelay->value();
- ui.spinBoxBondDelay_2->setValue(m_curBondParam.iPickOrBondDelay);
- if (m_curBondParam.iPickOrBondDelay == m_tempBondParam.iPickOrBondDelay)
- ui.spinBoxBondDelay_2->setStyleSheet(""); // 恢复默认样式
- else
- ui.spinBoxBondDelay_2->setStyleSheet("color: red;"); // 字体颜色变红
- }
- });
- connect(ui.spinBoxPickBlockCheckDelay, &SpinBox::editDone, this, [=]() {
- m_curWaferPickParam.iBlockOrLoseDelay = ui.spinBoxPickBlockCheckDelay->value();
- // 颜色变红显示变化
- if (m_curWaferPickParam.iBlockOrLoseDelay == m_tempWaferPickParam.iBlockOrLoseDelay)
- ui.spinBoxPickBlockCheckDelay->setStyleSheet(""); // 恢复默认样式
- else
- ui.spinBoxPickBlockCheckDelay->setStyleSheet("color: red;"); // 字体颜色变红
- // 如果有同步需求,添加类似的代码
- if (m_curCalibPickParam.iId == m_curWaferPickParam.iId) {
- m_curCalibPickParam.iBlockOrLoseDelay = ui.spinBoxPickBlockCheckDelay->value();
- ui.spinBoxPickBlockCheckDelay_2->setValue(m_curCalibPickParam.iBlockOrLoseDelay);
- if (m_curCalibPickParam.iBlockOrLoseDelay == m_tempCalibPickParam.iBlockOrLoseDelay)
- ui.spinBoxPickBlockCheckDelay_2->setStyleSheet(""); // 恢复默认样式
- else
- ui.spinBoxPickBlockCheckDelay_2->setStyleSheet("color: red;"); // 字体颜色变红
- }
- if (m_curCalibPlaceParam.iId == m_curWaferPickParam.iId) {
- m_curCalibPlaceParam.iBlockOrLoseDelay = ui.spinBoxPickBlockCheckDelay->value();
- ui.spinBoxBondBlockCheckDelay->setValue(m_curCalibPlaceParam.iBlockOrLoseDelay);
- if (m_curCalibPlaceParam.iBlockOrLoseDelay == m_tempCalibPlaceParam.iBlockOrLoseDelay)
- ui.spinBoxBondBlockCheckDelay->setStyleSheet(""); // 恢复默认样式
- else
- ui.spinBoxBondBlockCheckDelay->setStyleSheet("color: red;"); // 字体颜色变红
- }
- if (m_curBondParam.iId == m_curWaferPickParam.iId) {
- m_curBondParam.iBlockOrLoseDelay = ui.spinBoxPickBlockCheckDelay->value();
- ui.spinBoxBondBlockCheckDelay_2->setValue(m_curBondParam.iBlockOrLoseDelay);
- if (m_curBondParam.iBlockOrLoseDelay == m_tempBondParam.iBlockOrLoseDelay)
- ui.spinBoxBondBlockCheckDelay_2->setStyleSheet(""); // 恢复默认样式
- else
- ui.spinBoxBondBlockCheckDelay_2->setStyleSheet("color: red;"); // 字体颜色变红
- }
- });
- connect(ui.spinBoxPickVacDelay, &SpinBox::editDone, this, [=]() {
- m_curWaferPickParam.iVacuumDelay = ui.spinBoxPickVacDelay->value();
- // 颜色变红显示变化
- if (m_curWaferPickParam.iVacuumDelay == m_tempWaferPickParam.iVacuumDelay)
- ui.spinBoxPickVacDelay->setStyleSheet(""); // 恢复默认样式
- else
- ui.spinBoxPickVacDelay->setStyleSheet("color: red;"); // 字体颜色变红
- // 如果有同步需求,添加类似的代码
- if (m_curCalibPickParam.iId == m_curWaferPickParam.iId) {
- m_curCalibPickParam.iVacuumDelay = ui.spinBoxPickVacDelay->value();
- ui.spinBoxPickVacDelay_2->setValue(m_curCalibPickParam.iVacuumDelay);
- if (m_curCalibPickParam.iVacuumDelay == m_tempCalibPickParam.iVacuumDelay)
- ui.spinBoxPickVacDelay_2->setStyleSheet(""); // 恢复默认样式
- else
- ui.spinBoxPickVacDelay_2->setStyleSheet("color: red;"); // 字体颜色变红
- }
- if (m_curCalibPlaceParam.iId == m_curWaferPickParam.iId) {
- m_curCalibPlaceParam.iVacuumDelay = ui.spinBoxPickVacDelay->value();
- ui.spinBoxBondVacDelay->setValue(m_curCalibPlaceParam.iVacuumDelay);
- if (m_curCalibPlaceParam.iVacuumDelay == m_tempCalibPlaceParam.iVacuumDelay)
- ui.spinBoxBondVacDelay->setStyleSheet(""); // 恢复默认样式
- else
- ui.spinBoxBondVacDelay->setStyleSheet("color: red;"); // 字体颜色变红
- }
- if (m_curBondParam.iId == m_curWaferPickParam.iId) {
- m_curBondParam.iVacuumDelay = ui.spinBoxPickVacDelay->value();
- ui.spinBoxBondVacDelay_2->setValue(m_curBondParam.iVacuumDelay);
- if (m_curBondParam.iVacuumDelay == m_tempBondParam.iVacuumDelay)
- ui.spinBoxBondVacDelay_2->setStyleSheet(""); // 恢复默认样式
- else
- ui.spinBoxBondVacDelay_2->setStyleSheet("color: red;"); // 字体颜色变红
- }
- });
- connect(ui.spinBoxPickBlowDelay, &SpinBox::editDone, this, [=]() {
- m_curWaferPickParam.iBlowDelay = ui.spinBoxPickBlowDelay->value();
- // 颜色变红显示变化
- if (m_curWaferPickParam.iBlowDelay == m_tempWaferPickParam.iBlowDelay)
- ui.spinBoxPickBlowDelay->setStyleSheet(""); // 恢复默认样式
- else
- ui.spinBoxPickBlowDelay->setStyleSheet("color: red;"); // 字体颜色变红
- // 如果有同步需求,添加类似的代码
- if (m_curCalibPickParam.iId == m_curWaferPickParam.iId) {
- m_curCalibPickParam.iBlowDelay = ui.spinBoxPickBlowDelay->value();
- ui.spinBoxPickBlowDelay_2->setValue(m_curCalibPickParam.iBlowDelay);
- if (m_curCalibPickParam.iBlowDelay == m_tempCalibPickParam.iBlowDelay)
- ui.spinBoxPickBlowDelay_2->setStyleSheet(""); // 恢复默认样式
- else
- ui.spinBoxPickBlowDelay_2->setStyleSheet("color: red;"); // 字体颜色变红
- }
- if (m_curCalibPlaceParam.iId == m_curWaferPickParam.iId) {
- m_curCalibPlaceParam.iBlowDelay = ui.spinBoxPickBlowDelay->value();
- ui.spinBoxBondBlowDelay->setValue(m_curCalibPlaceParam.iBlowDelay);
- if (m_curCalibPlaceParam.iBlowDelay == m_tempCalibPlaceParam.iBlowDelay)
- ui.spinBoxBondBlowDelay->setStyleSheet(""); // 恢复默认样式
- else
- ui.spinBoxBondBlowDelay->setStyleSheet("color: red;"); // 字体颜色变红
- }
- if (m_curBondParam.iId == m_curWaferPickParam.iId) {
- m_curBondParam.iBlowDelay = ui.spinBoxPickBlowDelay->value();
- ui.spinBoxBondBlowDelay_2->setValue(m_curBondParam.iBlowDelay);
- if (m_curBondParam.iBlowDelay == m_tempBondParam.iBlowDelay)
- ui.spinBoxBondBlowDelay_2->setStyleSheet(""); // 恢复默认样式
- else
- ui.spinBoxBondBlowDelay_2->setStyleSheet("color: red;"); // 字体颜色变红
- }
- });
- }
- // 晶圆台取晶连接控件
- void BondMatrixProgramPage::connectCalibPickControls()
- {
- connect(ui.checkBoxPickBlockCheck_2, &QCheckBox::clicked, this, [=](bool isChecked) {
- m_curCalibPickParam.bCheckBlock = isChecked;
- // 颜色变红显示变化
- if (m_curCalibPickParam.bCheckBlock == m_tempCalibPickParam.bCheckBlock)
- ui.checkBoxPickBlockCheck_2->setStyleSheet(""); // 恢复默认样式
- else
- ui.checkBoxPickBlockCheck_2->setStyleSheet("color: red;"); // 字体颜色变红
- // 同步其他控件
- if (m_curCalibPickParam.iId == m_curWaferPickParam.iId) {
- m_curWaferPickParam.bCheckBlock = isChecked;
- ui.checkBoxPickBlockCheck->setChecked(m_curWaferPickParam.bCheckBlock);
- if (m_curWaferPickParam.bCheckBlock == m_tempWaferPickParam.bCheckBlock)
- ui.checkBoxPickBlockCheck->setStyleSheet(""); // 恢复默认样式
- else
- ui.checkBoxPickBlockCheck->setStyleSheet("color: red;"); // 字体颜色变红
- }
- if (m_curCalibPlaceParam.iId == m_curWaferPickParam.iId) {
- m_curCalibPlaceParam.bCheckBlock = isChecked;
- ui.checkBoxBondBlockCheck->setChecked(m_curCalibPlaceParam.bCheckBlock);
- if (m_curCalibPlaceParam.bCheckBlock == m_tempCalibPlaceParam.bCheckBlock)
- ui.checkBoxBondBlockCheck->setStyleSheet(""); // 恢复默认样式
- else
- ui.checkBoxBondBlockCheck->setStyleSheet("color: red;"); // 字体颜色变红
- }
- if (m_curBondParam.iId == m_curWaferPickParam.iId) {
- m_curBondParam.bCheckBlock = isChecked;
- ui.checkBoxBondBlockCheck_2->setChecked(m_curBondParam.bCheckBlock);
- if (m_curBondParam.bCheckBlock == m_tempBondParam.bCheckBlock)
- ui.checkBoxBondBlockCheck_2->setStyleSheet(""); // 恢复默认样式
- else
- ui.checkBoxBondBlockCheck_2->setStyleSheet("color: red;"); // 字体颜色变红
- }
- });
- connect(ui.checkBoxPickLoseCheck_2, &QCheckBox::clicked, this, [=](bool isChecked) {
- m_curCalibPickParam.bCheckLose = isChecked;
- // 颜色变红显示变化
- if (m_curCalibPickParam.bCheckLose == m_tempCalibPickParam.bCheckLose)
- ui.checkBoxPickLoseCheck_2->setStyleSheet(""); // 恢复默认样式
- else
- ui.checkBoxPickLoseCheck_2->setStyleSheet("color: red;"); // 字体颜色变红
- // 同步其他控件
- if (m_curCalibPickParam.iId == m_curWaferPickParam.iId) {
- m_curWaferPickParam.bCheckLose = isChecked;
- ui.checkBoxPickLoseCheck->setChecked(m_curWaferPickParam.bCheckLose);
- if (m_curWaferPickParam.bCheckLose == m_tempWaferPickParam.bCheckLose)
- ui.checkBoxPickLoseCheck->setStyleSheet(""); // 恢复默认样式
- else
- ui.checkBoxPickLoseCheck->setStyleSheet("color: red;"); // 字体颜色变红
- }
- if (m_curCalibPlaceParam.iId == m_curWaferPickParam.iId) {
- m_curCalibPlaceParam.bCheckLose = isChecked;
- ui.checkBoxBondLoseCheck->setChecked(m_curCalibPlaceParam.bCheckLose);
- if (m_curCalibPlaceParam.bCheckLose == m_tempCalibPlaceParam.bCheckLose)
- ui.checkBoxBondLoseCheck->setStyleSheet(""); // 恢复默认样式
- else
- ui.checkBoxBondLoseCheck->setStyleSheet("color: red;"); // 字体颜色变红
- }
- if (m_curBondParam.iId == m_curWaferPickParam.iId) {
- m_curBondParam.bCheckLose = isChecked;
- ui.checkBoxBondLoseCheck_2->setChecked(m_curBondParam.bCheckLose);
- if (m_curBondParam.bCheckLose == m_tempBondParam.bCheckLose)
- ui.checkBoxBondLoseCheck_2->setStyleSheet(""); // 恢复默认样式
- else
- ui.checkBoxBondLoseCheck_2->setStyleSheet("color: red;"); // 字体颜色变红
- }
- });
- connect(ui.checkBoxPickFindForceCheck_2, &QCheckBox::clicked, this, [=](bool isChecked) {
- m_curCalibPickParam.bFindForce = isChecked;
- ui.doubleSpinBoxPickPosZ_2->setEnabled(!isChecked);
- // 颜色变红显示变化
- if (m_curCalibPickParam.bFindForce == m_tempCalibPickParam.bFindForce)
- ui.checkBoxPickFindForceCheck_2->setStyleSheet(""); // 恢复默认样式
- else
- ui.checkBoxPickFindForceCheck_2->setStyleSheet("color: red;"); // 字体颜色变红
- // 同步其他控件并处理样式
- if (m_curCalibPickParam.iId == m_curWaferPickParam.iId) {
- m_curWaferPickParam.bFindForce = isChecked;
- ui.checkBoxPickFindForceCheck->setChecked(m_curWaferPickParam.bFindForce);
- if (m_curWaferPickParam.bFindForce == m_tempWaferPickParam.bFindForce)
- ui.checkBoxPickFindForceCheck->setStyleSheet(""); // 恢复默认样式
- else
- ui.checkBoxPickFindForceCheck->setStyleSheet("color: red;"); // 字体颜色变红
- ui.doubleSpinBoxPickPosZ->setEnabled(!isChecked);
- }
- if (m_curCalibPlaceParam.iId == m_curWaferPickParam.iId) {
- m_curCalibPlaceParam.bFindForce = isChecked;
- ui.checkBoxBondFindForce->setChecked(m_curCalibPlaceParam.bFindForce);
- if (m_curCalibPlaceParam.bFindForce == m_tempCalibPlaceParam.bFindForce)
- ui.checkBoxBondFindForce->setStyleSheet(""); // 恢复默认样式
- else
- ui.checkBoxBondFindForce->setStyleSheet("color: red;"); // 字体颜色变红
- ui.doubleSpinBoxBondPosZ->setEnabled(!isChecked);
- }
- if (m_curBondParam.iId == m_curWaferPickParam.iId) {
- m_curBondParam.bFindForce = isChecked;
- ui.checkBoxBondFindForce_2->setChecked(m_curBondParam.bFindForce);
- if (m_curBondParam.bFindForce == m_tempBondParam.bFindForce)
- ui.checkBoxBondFindForce_2->setStyleSheet(""); // 恢复默认样式
- else
- ui.checkBoxBondFindForce_2->setStyleSheet("color: red;"); // 字体颜色变红
- ui.doubleSpinBoxBondPosZ_2->setEnabled(!isChecked);
- }
- });
- connect(ui.doubleSpinBoxPrePickZ_2, &DoubleSpinBox::editDone, this, [=]() {
- m_curCalibPickParam.dPreLevOffset = ui.doubleSpinBoxPrePickZ_2->value();
- // 颜色变红显示变化
- if (m_curCalibPickParam.dPreLevOffset == m_tempCalibPickParam.dPreLevOffset)
- ui.doubleSpinBoxPrePickZ_2->setStyleSheet(""); // 恢复默认样式
- else
- ui.doubleSpinBoxPrePickZ_2->setStyleSheet("color: red;"); // 字体颜色变红
- // 同步其他控件并处理样式
- if (m_curCalibPickParam.iId == m_curWaferPickParam.iId) {
- m_curWaferPickParam.dPreLevOffset = ui.doubleSpinBoxPrePickZ_2->value();
- ui.doubleSpinBoxPrePickZ->setValue(m_curWaferPickParam.dPreLevOffset);
- if (m_curWaferPickParam.dPreLevOffset == m_tempWaferPickParam.dPreLevOffset)
- ui.doubleSpinBoxPrePickZ->setStyleSheet(""); // 恢复默认样式
- else
- ui.doubleSpinBoxPrePickZ->setStyleSheet("color: red;"); // 字体颜色变红
- }
- if (m_curCalibPlaceParam.iId == m_curWaferPickParam.iId) {
- m_curCalibPlaceParam.dPreLevOffset = ui.doubleSpinBoxPrePickZ_2->value();
- ui.doubleSpinBoxPreBondPosZ->setValue(m_curCalibPlaceParam.dPreLevOffset);
- if (m_curCalibPlaceParam.dPreLevOffset == m_tempCalibPlaceParam.dPreLevOffset)
- ui.doubleSpinBoxPreBondPosZ->setStyleSheet(""); // 恢复默认样式
- else
- ui.doubleSpinBoxPreBondPosZ->setStyleSheet("color: red;"); // 字体颜色变红
- }
- if (m_curBondParam.iId == m_curWaferPickParam.iId) {
- m_curBondParam.dPreLevOffset = ui.doubleSpinBoxPrePickZ_2->value();
- ui.doubleSpinBoxPreBondPosZ_2->setValue(m_curBondParam.dPreLevOffset);
- if (m_curBondParam.dPreLevOffset == m_tempBondParam.dPreLevOffset)
- ui.doubleSpinBoxPreBondPosZ_2->setStyleSheet(""); // 恢复默认样式
- else
- ui.doubleSpinBoxPreBondPosZ_2->setStyleSheet("color: red;"); // 字体颜色变红
- }
- });
- connect(ui.doubleSpinBoxPickForce_2, &DoubleSpinBox::editDone, this, [=]() {
- m_curCalibPickParam.dForce = ui.doubleSpinBoxPickForce_2->value();
- // 颜色变红显示变化
- if (m_curCalibPickParam.dForce == m_tempCalibPickParam.dForce)
- ui.doubleSpinBoxPickForce_2->setStyleSheet(""); // 恢复默认样式
- else
- ui.doubleSpinBoxPickForce_2->setStyleSheet("color: red;"); // 字体颜色变红
- // 同步其他控件并处理样式
- if (m_curCalibPickParam.iId == m_curWaferPickParam.iId) {
- m_curWaferPickParam.dForce = ui.doubleSpinBoxPickForce_2->value();
- ui.doubleSpinBoxPickForce->setValue(m_curWaferPickParam.dForce);
- if (m_curWaferPickParam.dForce == m_tempWaferPickParam.dForce)
- ui.doubleSpinBoxPickForce->setStyleSheet(""); // 恢复默认样式
- else
- ui.doubleSpinBoxPickForce->setStyleSheet("color: red;"); // 字体颜色变红
- }
- if (m_curCalibPlaceParam.iId == m_curWaferPickParam.iId) {
- m_curCalibPlaceParam.dForce = ui.doubleSpinBoxPickForce_2->value();
- ui.doubleSpinBoxBondForce->setValue(m_curCalibPlaceParam.dForce);
- if (m_curCalibPlaceParam.dForce == m_tempCalibPlaceParam.dForce)
- ui.doubleSpinBoxBondForce->setStyleSheet(""); // 恢复默认样式
- else
- ui.doubleSpinBoxBondForce->setStyleSheet("color: red;"); // 字体颜色变红
- }
- if (m_curBondParam.iId == m_curWaferPickParam.iId) {
- m_curBondParam.dForce = ui.doubleSpinBoxPickForce_2->value();
- ui.doubleSpinBoxBondForce_2->setValue(m_curBondParam.dForce);
- if (m_curBondParam.dForce == m_tempBondParam.dForce)
- ui.doubleSpinBoxBondForce_2->setStyleSheet(""); // 恢复默认样式
- else
- ui.doubleSpinBoxBondForce_2->setStyleSheet("color: red;"); // 字体颜色变红
- }
- });
- connect(ui.doubleSpinBoxPickPosZ_2, &DoubleSpinBox::editDone, this, [=]() {
- m_curCalibPickParam.dWorkLevOffset = ui.doubleSpinBoxPickPosZ_2->value();
- // 颜色变红显示变化
- if (m_curCalibPickParam.dWorkLevOffset == m_tempCalibPickParam.dWorkLevOffset)
- ui.doubleSpinBoxPickPosZ_2->setStyleSheet(""); // 恢复默认样式
- else
- ui.doubleSpinBoxPickPosZ_2->setStyleSheet("color: red;"); // 字体颜色变红
- // 同步其他控件并处理样式
- if (m_curCalibPickParam.iId == m_curWaferPickParam.iId) {
- m_curWaferPickParam.dWorkLevOffset = ui.doubleSpinBoxPickPosZ_2->value();
- ui.doubleSpinBoxPickPosZ->setValue(m_curWaferPickParam.dWorkLevOffset);
- if (m_curWaferPickParam.dWorkLevOffset == m_tempWaferPickParam.dWorkLevOffset)
- ui.doubleSpinBoxPickPosZ->setStyleSheet(""); // 恢复默认样式
- else
- ui.doubleSpinBoxPickPosZ->setStyleSheet("color: red;"); // 字体颜色变红
- }
- if (m_curCalibPlaceParam.iId == m_curWaferPickParam.iId) {
- m_curCalibPlaceParam.dWorkLevOffset = ui.doubleSpinBoxPickPosZ_2->value();
- ui.doubleSpinBoxBondPosZ->setValue(m_curCalibPlaceParam.dWorkLevOffset);
- if (m_curCalibPlaceParam.dWorkLevOffset == m_tempCalibPlaceParam.dWorkLevOffset)
- ui.doubleSpinBoxBondPosZ->setStyleSheet(""); // 恢复默认样式
- else
- ui.doubleSpinBoxBondPosZ->setStyleSheet("color: red;"); // 字体颜色变红
- }
- if (m_curBondParam.iId == m_curWaferPickParam.iId) {
- m_curBondParam.dWorkLevOffset = ui.doubleSpinBoxPickPosZ_2->value();
- ui.doubleSpinBoxBondPosZ_2->setValue(m_curBondParam.dWorkLevOffset);
- if (m_curBondParam.dWorkLevOffset == m_tempBondParam.dWorkLevOffset)
- ui.doubleSpinBoxBondPosZ_2->setStyleSheet(""); // 恢复默认样式
- else
- ui.doubleSpinBoxBondPosZ_2->setStyleSheet("color: red;"); // 字体颜色变红
- }
- });
- connect(ui.spinBoxPickGrabDelay_2, &SpinBox::editDone, this, [=]() {
- m_curCalibPickParam.iGrabDelay = ui.spinBoxPickGrabDelay_2->value();
- // 颜色变红显示变化
- if (m_curCalibPickParam.iGrabDelay == m_tempCalibPickParam.iGrabDelay)
- ui.spinBoxPickGrabDelay_2->setStyleSheet(""); // 恢复默认样式
- else
- ui.spinBoxPickGrabDelay_2->setStyleSheet("color: red;"); // 字体颜色变红
- // 同步其他控件并处理样式
- if (m_curCalibPickParam.iId == m_curWaferPickParam.iId) {
- m_curWaferPickParam.iGrabDelay = ui.spinBoxPickGrabDelay_2->value();
- ui.spinBoxPickGrabDelay->setValue(m_curWaferPickParam.iGrabDelay);
- if (m_curWaferPickParam.iGrabDelay == m_tempWaferPickParam.iGrabDelay)
- ui.spinBoxPickGrabDelay->setStyleSheet(""); // 恢复默认样式
- else
- ui.spinBoxPickGrabDelay->setStyleSheet("color: red;"); // 字体颜色变红
- }
- if (m_curCalibPlaceParam.iId == m_curWaferPickParam.iId) {
- m_curCalibPlaceParam.iGrabDelay = ui.spinBoxPickGrabDelay_2->value();
- ui.spinBoxBondGrabDelay->setValue(m_curCalibPlaceParam.iGrabDelay);
- if (m_curCalibPlaceParam.iGrabDelay == m_tempCalibPlaceParam.iGrabDelay)
- ui.spinBoxBondGrabDelay->setStyleSheet(""); // 恢复默认样式
- else
- ui.spinBoxBondGrabDelay->setStyleSheet("color: red;"); // 字体颜色变红
- }
- if (m_curBondParam.iId == m_curWaferPickParam.iId) {
- m_curBondParam.iGrabDelay = ui.spinBoxPickGrabDelay_2->value();
- ui.spinBoxBondGrabDelay_2->setValue(m_curBondParam.iGrabDelay);
- if (m_curBondParam.iGrabDelay == m_tempBondParam.iGrabDelay)
- ui.spinBoxBondGrabDelay_2->setStyleSheet(""); // 恢复默认样式
- else
- ui.spinBoxBondGrabDelay_2->setStyleSheet("color: red;"); // 字体颜色变红
- }
- });
- connect(ui.spinBoxPickDelay_2, &SpinBox::editDone, this, [=]() {
- m_curCalibPickParam.iPickOrBondDelay = ui.spinBoxPickDelay_2->value();
- // 颜色变红显示变化
- if (m_curCalibPickParam.iPickOrBondDelay == m_tempCalibPickParam.iPickOrBondDelay)
- ui.spinBoxPickDelay_2->setStyleSheet(""); // 恢复默认样式
- else
- ui.spinBoxPickDelay_2->setStyleSheet("color: red;"); // 字体颜色变红
- // 同步其他控件并处理样式
- if (m_curCalibPickParam.iId == m_curWaferPickParam.iId) {
- m_curWaferPickParam.iPickOrBondDelay = ui.spinBoxPickDelay_2->value();
- ui.spinBoxPickDelay->setValue(m_curWaferPickParam.iPickOrBondDelay);
- if (m_curWaferPickParam.iPickOrBondDelay == m_tempWaferPickParam.iPickOrBondDelay)
- ui.spinBoxPickDelay->setStyleSheet(""); // 恢复默认样式
- else
- ui.spinBoxPickDelay->setStyleSheet("color: red;"); // 字体颜色变红
- }
- if (m_curCalibPlaceParam.iId == m_curWaferPickParam.iId) {
- m_curCalibPlaceParam.iPickOrBondDelay = ui.spinBoxPickDelay_2->value();
- ui.spinBoxBondDelay->setValue(m_curCalibPlaceParam.iPickOrBondDelay);
- if (m_curCalibPlaceParam.iPickOrBondDelay == m_tempCalibPlaceParam.iPickOrBondDelay)
- ui.spinBoxBondDelay->setStyleSheet(""); // 恢复默认样式
- else
- ui.spinBoxBondDelay->setStyleSheet("color: red;"); // 字体颜色变红
- }
- if (m_curBondParam.iId == m_curWaferPickParam.iId) {
- m_curBondParam.iPickOrBondDelay = ui.spinBoxPickDelay_2->value();
- ui.spinBoxBondDelay_2->setValue(m_curBondParam.iPickOrBondDelay);
- if (m_curBondParam.iPickOrBondDelay == m_tempBondParam.iPickOrBondDelay)
- ui.spinBoxBondDelay_2->setStyleSheet(""); // 恢复默认样式
- else
- ui.spinBoxBondDelay_2->setStyleSheet("color: red;"); // 字体颜色变红
- }
- });
- connect(ui.spinBoxPickBlockCheckDelay_2, &SpinBox::editDone, this, [=]() {
- m_curCalibPickParam.iBlockOrLoseDelay = ui.spinBoxPickBlockCheckDelay_2->value();
- // 颜色变红显示变化
- if (m_curCalibPickParam.iBlockOrLoseDelay == m_tempCalibPickParam.iBlockOrLoseDelay)
- ui.spinBoxPickBlockCheckDelay_2->setStyleSheet(""); // 恢复默认样式
- else
- ui.spinBoxPickBlockCheckDelay_2->setStyleSheet("color: red;"); // 字体颜色变红
- // 同步其他控件并处理样式
- if (m_curCalibPickParam.iId == m_curWaferPickParam.iId) {
- m_curWaferPickParam.iBlockOrLoseDelay = ui.spinBoxPickBlockCheckDelay_2->value();
- ui.spinBoxPickBlockCheckDelay->setValue(m_curWaferPickParam.iBlockOrLoseDelay);
- if (m_curWaferPickParam.iBlockOrLoseDelay == m_tempWaferPickParam.iBlockOrLoseDelay)
- ui.spinBoxPickBlockCheckDelay->setStyleSheet(""); // 恢复默认样式
- else
- ui.spinBoxPickBlockCheckDelay->setStyleSheet("color: red;"); // 字体颜色变红
- }
- if (m_curCalibPlaceParam.iId == m_curWaferPickParam.iId) {
- m_curCalibPlaceParam.iBlockOrLoseDelay = ui.spinBoxPickBlockCheckDelay_2->value();
- ui.spinBoxBondBlockCheckDelay->setValue(m_curCalibPlaceParam.iBlockOrLoseDelay);
- if (m_curCalibPlaceParam.iBlockOrLoseDelay == m_tempCalibPlaceParam.iBlockOrLoseDelay)
- ui.spinBoxBondBlockCheckDelay->setStyleSheet(""); // 恢复默认样式
- else
- ui.spinBoxBondBlockCheckDelay->setStyleSheet("color: red;"); // 字体颜色变红
- }
- if (m_curBondParam.iId == m_curWaferPickParam.iId) {
- m_curBondParam.iBlockOrLoseDelay = ui.spinBoxPickBlockCheckDelay_2->value();
- ui.spinBoxBondBlockCheckDelay_2->setValue(m_curBondParam.iBlockOrLoseDelay);
- if (m_curBondParam.iBlockOrLoseDelay == m_tempBondParam.iBlockOrLoseDelay)
- ui.spinBoxBondBlockCheckDelay_2->setStyleSheet(""); // 恢复默认样式
- else
- ui.spinBoxBondBlockCheckDelay_2->setStyleSheet("color: red;"); // 字体颜色变红
- }
- });
- connect(ui.spinBoxPickVacDelay_2, &SpinBox::editDone, this, [=]() {
- m_curCalibPickParam.iVacuumDelay = ui.spinBoxPickVacDelay_2->value();
- // 颜色变红显示变化
- if (m_curCalibPickParam.iVacuumDelay == m_tempCalibPickParam.iVacuumDelay)
- ui.spinBoxPickVacDelay_2->setStyleSheet(""); // 恢复默认样式
- else
- ui.spinBoxPickVacDelay_2->setStyleSheet("color: red;"); // 字体颜色变红
- // 同步其他控件并处理样式
- if (m_curCalibPickParam.iId == m_curWaferPickParam.iId) {
- m_curWaferPickParam.iVacuumDelay = ui.spinBoxPickVacDelay_2->value();
- ui.spinBoxPickVacDelay->setValue(m_curWaferPickParam.iVacuumDelay);
- if (m_curWaferPickParam.iVacuumDelay == m_tempWaferPickParam.iVacuumDelay)
- ui.spinBoxPickVacDelay->setStyleSheet(""); // 恢复默认样式
- else
- ui.spinBoxPickVacDelay->setStyleSheet("color: red;"); // 字体颜色变红
- }
- if (m_curCalibPlaceParam.iId == m_curWaferPickParam.iId) {
- m_curCalibPlaceParam.iVacuumDelay = ui.spinBoxPickVacDelay_2->value();
- ui.spinBoxBondVacDelay->setValue(m_curCalibPlaceParam.iVacuumDelay);
- if (m_curCalibPlaceParam.iVacuumDelay == m_tempCalibPlaceParam.iVacuumDelay)
- ui.spinBoxBondVacDelay->setStyleSheet(""); // 恢复默认样式
- else
- ui.spinBoxBondVacDelay->setStyleSheet("color: red;"); // 字体颜色变红
- }
- if (m_curBondParam.iId == m_curWaferPickParam.iId) {
- m_curBondParam.iVacuumDelay = ui.spinBoxPickVacDelay_2->value();
- ui.spinBoxBondVacDelay_2->setValue(m_curBondParam.iVacuumDelay);
- if (m_curBondParam.iVacuumDelay == m_tempBondParam.iVacuumDelay)
- ui.spinBoxBondVacDelay_2->setStyleSheet(""); // 恢复默认样式
- else
- ui.spinBoxBondVacDelay_2->setStyleSheet("color: red;"); // 字体颜色变红
- }
- });
- connect(ui.spinBoxPickBlowDelay_2, &SpinBox::editDone, this, [=]() {
- m_curCalibPickParam.iBlowDelay = ui.spinBoxPickBlowDelay_2->value();
- // 颜色变红显示变化
- if (m_curCalibPickParam.iBlowDelay == m_tempCalibPickParam.iBlowDelay)
- ui.spinBoxPickBlowDelay_2->setStyleSheet(""); // 恢复默认样式
- else
- ui.spinBoxPickBlowDelay_2->setStyleSheet("color: red;"); // 字体颜色变红
- // 同步其他控件并处理样式
- if (m_curCalibPickParam.iId == m_curWaferPickParam.iId) {
- m_curWaferPickParam.iBlowDelay = ui.spinBoxPickBlowDelay_2->value();
- ui.spinBoxPickBlowDelay->setValue(m_curWaferPickParam.iBlowDelay);
- if (m_curWaferPickParam.iBlowDelay == m_tempWaferPickParam.iBlowDelay)
- ui.spinBoxPickBlowDelay->setStyleSheet(""); // 恢复默认样式
- else
- ui.spinBoxPickBlowDelay->setStyleSheet("color: red;"); // 字体颜色变红
- }
- if (m_curCalibPlaceParam.iId == m_curWaferPickParam.iId) {
- m_curCalibPlaceParam.iBlowDelay = ui.spinBoxPickBlowDelay_2->value();
- ui.spinBoxBondBlowDelay->setValue(m_curCalibPlaceParam.iBlowDelay);
- if (m_curCalibPlaceParam.iBlowDelay == m_tempCalibPlaceParam.iBlowDelay)
- ui.spinBoxBondBlowDelay->setStyleSheet(""); // 恢复默认样式
- else
- ui.spinBoxBondBlowDelay->setStyleSheet("color: red;"); // 字体颜色变红
- }
- if (m_curBondParam.iId == m_curWaferPickParam.iId) {
- m_curBondParam.iBlowDelay = ui.spinBoxPickBlowDelay_2->value();
- ui.spinBoxBondBlowDelay_2->setValue(m_curBondParam.iBlowDelay);
- if (m_curBondParam.iBlowDelay == m_tempBondParam.iBlowDelay)
- ui.spinBoxBondBlowDelay_2->setStyleSheet(""); // 恢复默认样式
- else
- ui.spinBoxBondBlowDelay_2->setStyleSheet("color: red;"); // 字体颜色变红
- }
- });
- }
- // 连接 "中转台固晶" 控件
- void BondMatrixProgramPage::connectCalibPlaceControls()
- {
- connect(ui.checkBoxBondBlockCheck, &QCheckBox::clicked, this, &BondMatrixProgramPage::onCheckBoxBondBlockCheckClicked);
- connect(ui.checkBoxBondLoseCheck, &QCheckBox::clicked, this, &BondMatrixProgramPage::onCheckBoxBondLoseCheckClicked);
- connect(ui.checkBoxBondFindForce, &QCheckBox::clicked, this, &BondMatrixProgramPage::onCheckBoxBondFindForceClicked);
- connect(ui.doubleSpinBoxPreBondPosZ, &QDoubleSpinBox::editingFinished, this, &BondMatrixProgramPage::onDoubleSpinBoxPreBondPosZEditingFinished);
- connect(ui.doubleSpinBoxBondForce, &QDoubleSpinBox::editingFinished, this, &BondMatrixProgramPage::onDoubleSpinBoxBondForceEditingFinished);
- connect(ui.doubleSpinBoxBondPosZ, &QDoubleSpinBox::editingFinished, this, &BondMatrixProgramPage::onDoubleSpinBoxBondPosZEditingFinished);
- connect(ui.spinBoxBondGrabDelay, &QSpinBox::editingFinished, this, &BondMatrixProgramPage::onSpinBoxBondGrabDelayEditingFinished);
- connect(ui.spinBoxBondBlockCheckDelay, &QSpinBox::editingFinished, this, &BondMatrixProgramPage::onSpinBoxBondBlockCheckDelayEditingFinished);
- connect(ui.spinBoxBondDelay, &QSpinBox::editingFinished, this, &BondMatrixProgramPage::onSpinBoxBondDelayEditingFinished);
- connect(ui.spinBoxBondVacDelay, &QSpinBox::editingFinished, this, &BondMatrixProgramPage::onSpinBoxBondVacDelayEditingFinished);
- connect(ui.spinBoxBondBlowDelay, &QSpinBox::editingFinished, this, &BondMatrixProgramPage::onSpinBoxBondBlowDelayEditingFinished);
- }
- // 连接 "固晶台固晶" 控件
- void BondMatrixProgramPage::connectBondControls()
- {
- connect(ui.checkBoxBondBlockCheck_2, &QCheckBox::clicked, this, &BondMatrixProgramPage::onCheckBoxBondBlockCheck_2Clicked);
- connect(ui.checkBoxBondLoseCheck_2, &QCheckBox::clicked, this, &BondMatrixProgramPage::onCheckBoxBondLoseCheck_2Clicked);
- connect(ui.checkBoxBondFindForce_2, &QCheckBox::clicked, this, &BondMatrixProgramPage::onCheckBoxBondFindForce_2Clicked);
- connect(ui.doubleSpinBoxPreBondPosZ_2, &QDoubleSpinBox::editingFinished, this, &BondMatrixProgramPage::onDoubleSpinBoxPreBondPosZ_2EditingFinished);
- connect(ui.doubleSpinBoxBondForce_2, &QDoubleSpinBox::editingFinished, this, &BondMatrixProgramPage::onDoubleSpinBoxBondForce_2EditingFinished);
- connect(ui.doubleSpinBoxBondPosZ_2, &QDoubleSpinBox::editingFinished, this, &BondMatrixProgramPage::onDoubleSpinBoxBondPosZ_2EditingFinished);
- connect(ui.spinBoxBondGrabDelay_2, &QSpinBox::editingFinished, this, &BondMatrixProgramPage::onSpinBoxBondGrabDelay_2EditingFinished);
- connect(ui.spinBoxBondBlockCheckDelay_2, &QSpinBox::editingFinished, this, &BondMatrixProgramPage::onSpinBoxBondBlockCheckDelay_2EditingFinished);
- connect(ui.spinBoxBondDelay_2, &QSpinBox::editingFinished, this, &BondMatrixProgramPage::onSpinBoxBondDelay_2EditingFinished);
- connect(ui.spinBoxBondVacDelay_2, &QSpinBox::editingFinished, this, &BondMatrixProgramPage::onSpinBoxBondVacDelay_2EditingFinished);
- connect(ui.spinBoxBondBlowDelay_2, &QSpinBox::editingFinished, this, &BondMatrixProgramPage::onSpinBoxBondBlowDelay_2EditingFinished);
- }
- //ModifyTemplate
- void BondMatrixProgramPage::onSetParamPickTempClicked()
- {
- int iTemplateId = ui.comboBoxPickTempID->currentData().toInt();
- m_pProgramCViewInterface->GetViewMatrix()->ModifyBondMatrixTemplate(iTemplateId);
- }
- void BondMatrixProgramPage::onSetParamPreBondClicked()
- {
- int iTemplateId = ui.comboBoxPreBondTemp->currentData().toInt();
- m_pProgramCViewInterface->GetViewMatrix()->ModifyBondMatrixTemplate(iTemplateId);
- }
- void BondMatrixProgramPage::onSetParamPostBondClicked()
- {
- int iTemplateId = ui.comboBoxPostBondTemp->currentData().toInt();
- m_pProgramCViewInterface->GetViewMatrix()->ModifyBondMatrixTemplate(iTemplateId);
- }
- void BondMatrixProgramPage::onSetParamBondClicked()
- {
- int iTemplateId = ui.comboBoxBondTemp->currentData().toInt();
- m_pProgramCViewInterface->GetViewMatrix()->ModifyBondMatrixTemplate(iTemplateId);
- }
- void BondMatrixProgramPage::onSetParamLookUpClicked()
- {
- int iTemplateId = ui.comboBoxLookUpTemp->currentData().toInt();
- m_pProgramCViewInterface->GetViewMatrix()->ModifyBondMatrixTemplate(iTemplateId);
- }
- void BondMatrixProgramPage::onSetParamCalibPickClicked()
- {
- int iTemplateId = ui.comboBoxCalibPickTemp->currentData().toInt();
- m_pProgramCViewInterface->GetViewMatrix()->ModifyBondMatrixTemplate(iTemplateId);
- }
- void BondMatrixProgramPage::onSetParamPcbAlnPRStrategyClicked()
- {
- int iTemplateId = ui.comboBoxPcbAlnPRStrategyId->currentData().toInt();
- m_pProgramCViewInterface->GetViewMatrix()->ModifyBondMatrixTemplate(iTemplateId);
- }
- //CreateParam:目前都是一样的,如后续没有个性化的差异可以只用一个函数即可
- void BondMatrixProgramPage::onCreateParamPickTempClicked()
- {
- UINT iBondInfoId = ui.comboBoxCurrentPara->currentData().toUInt();
- m_pProgramCViewInterface->GetViewMatrix()->CreateBondMatrixTemplate(BOND_MATRIX_TEMPLATE_TYPE::TEMPLATE_WAFER_PICK, iBondInfoId);
- UpdateShowBondInfoData(iBondInfoId);
- }
- void BondMatrixProgramPage::onCreateParamPreBondClicked()
- {
- UINT iBondInfoId = ui.comboBoxCurrentPara->currentData().toUInt();
- m_pProgramCViewInterface->GetViewMatrix()->CreateBondMatrixTemplate(BOND_MATRIX_TEMPLATE_TYPE::TEMPLATE_BONDFRONT, iBondInfoId);
- UpdateShowBondInfoData(iBondInfoId);
- }
- void BondMatrixProgramPage::onCreateParamPostBondClicked()
- {
- UINT iBondInfoId = ui.comboBoxCurrentPara->currentData().toUInt();
- m_pProgramCViewInterface->GetViewMatrix()->CreateBondMatrixTemplate(BOND_MATRIX_TEMPLATE_TYPE::TEMPLATE_BONDBACK, iBondInfoId);
- UpdateShowBondInfoData(iBondInfoId);
- }
- void BondMatrixProgramPage::onCreateParamBondClicked()
- {
- UINT iBondInfoId = ui.comboBoxCurrentPara->currentData().toUInt();
- m_pProgramCViewInterface->GetViewMatrix()->CreateBondMatrixTemplate(BOND_MATRIX_TEMPLATE_TYPE::TEMPLATE_WORKTABLE_BOND, iBondInfoId);
- UpdateShowBondInfoData(iBondInfoId);
- }
- void BondMatrixProgramPage::onCreateParamLookUpClicked()
- {
- UINT iBondInfoId = ui.comboBoxCurrentPara->currentData().toUInt();
- m_pProgramCViewInterface->GetViewMatrix()->CreateBondMatrixTemplate(BOND_MATRIX_TEMPLATE_TYPE::TEMPLATE_LOOKUP, iBondInfoId);
- UpdateShowBondInfoData(iBondInfoId);
- }
- void BondMatrixProgramPage::onCreateParamCalibPickClicked()
- {
- UINT iBondInfoId = ui.comboBoxCurrentPara->currentData().toUInt();
- m_pProgramCViewInterface->GetViewMatrix()->CreateBondMatrixTemplate(BOND_MATRIX_TEMPLATE_TYPE::TEMPLATE_TRANSFER_PICK, iBondInfoId);
- UpdateShowBondInfoData(iBondInfoId);
- }
- void BondMatrixProgramPage::onCreatParamPcbAlnPRStrategyClicked()
- {
- UINT iBondInfoId = ui.comboBoxCurrentPara->currentData().toUInt();
- m_pProgramCViewInterface->GetViewMatrix()->CreateBondMatrixTemplate(BOND_MATRIX_TEMPLATE_TYPE::TEMPLATE_WORKTABLE_BOND_ALN, iBondInfoId);
- UpdateShowBondInfoData(iBondInfoId);
- }
- // 为华夫盒连接控件:优化使用
- void BondMatrixProgramPage::onCheckBoxPickBlockCheckClicked(bool isChecked)
- {
- m_curWaferPickParam.bCheckBlock = isChecked;
- }
- void BondMatrixProgramPage::onCheckBoxPickLoseCheckClicked(bool isChecked)
- {
- m_curWaferPickParam.bCheckLose = isChecked;
- }
- void BondMatrixProgramPage::onCheckBoxPickFindForceCheckClicked(bool isChecked)
- {
- m_curWaferPickParam.bFindForce = isChecked;
- }
- void BondMatrixProgramPage::onDoubleSpinBoxPrePickZEditingFinished()
- {
- m_curWaferPickParam.dPreLevOffset = ui.doubleSpinBoxPrePickZ->value();
- }
- void BondMatrixProgramPage::onDoubleSpinBoxPickForceEditingFinished()
- {
- m_curWaferPickParam.dForce = ui.doubleSpinBoxPickForce->value();
- }
- void BondMatrixProgramPage::onDoubleSpinBoxPickPosZEditingFinished()
- {
- m_curWaferPickParam.dWorkLevOffset = ui.doubleSpinBoxPickPosZ->value();
- }
- void BondMatrixProgramPage::onSpinBoxPickGrabDelayEditingFinished()
- {
- m_curWaferPickParam.iGrabDelay = ui.spinBoxPickGrabDelay->value();
- }
- void BondMatrixProgramPage::onSpinBoxPickDelayEditingFinished()
- {
- m_curWaferPickParam.iPickOrBondDelay = ui.spinBoxPickDelay->value();
- }
- void BondMatrixProgramPage::onSpinBoxPickBlockCheckDelayEditingFinished()
- {
- m_curWaferPickParam.iBlockOrLoseDelay = ui.spinBoxPickBlockCheckDelay->value();
- }
- void BondMatrixProgramPage::onSpinBoxPickVacDelayEditingFinished()
- {
- m_curWaferPickParam.iVacuumDelay = ui.spinBoxPickVacDelay->value();
- }
- void BondMatrixProgramPage::onSpinBoxPickBlowDelayEditingFinished()
- {
- m_curWaferPickParam.iBlowDelay = ui.spinBoxPickBlowDelay->value();
- }
- // 中转台取晶槽函数实现:优化使用
- void BondMatrixProgramPage::onCheckBoxPickBlockCheck_2Clicked(bool isChecked)
- {
- m_curCalibPickParam.bCheckBlock = isChecked;
- }
- void BondMatrixProgramPage::onCheckBoxPickLoseCheck_2Clicked(bool isChecked)
- {
- m_curCalibPickParam.bCheckLose = isChecked;
- }
- void BondMatrixProgramPage::onCheckBoxPickFindForceCheck_2Clicked(bool isChecked)
- {
- m_curCalibPickParam.bFindForce = isChecked;
- }
- void BondMatrixProgramPage::onDoubleSpinBoxPrePickZ_2EditingFinished()
- {
- m_curCalibPickParam.dPreLevOffset = ui.doubleSpinBoxPrePickZ_2->value();
- }
- void BondMatrixProgramPage::onDoubleSpinBoxPickForce_2EditingFinished()
- {
- m_curCalibPickParam.dForce = ui.doubleSpinBoxPickForce_2->value();
- }
- void BondMatrixProgramPage::onDoubleSpinBoxPickPosZ_2EditingFinished()
- {
- m_curCalibPickParam.dWorkLevOffset = ui.doubleSpinBoxPickPosZ_2->value();
- }
- void BondMatrixProgramPage::onSpinBoxPickGrabDelay_2EditingFinished()
- {
- m_curCalibPickParam.iGrabDelay = ui.spinBoxPickGrabDelay_2->value();
- }
- void BondMatrixProgramPage::onSpinBoxPickDelay_2EditingFinished()
- {
- m_curCalibPickParam.iPickOrBondDelay = ui.spinBoxPickDelay_2->value();
- }
- void BondMatrixProgramPage::onSpinBoxPickBlockCheckDelay_2EditingFinished()
- {
- m_curCalibPickParam.iBlockOrLoseDelay = ui.spinBoxPickBlockCheckDelay_2->value();
- }
- void BondMatrixProgramPage::onSpinBoxPickVacDelay_2EditingFinished()
- {
- m_curCalibPickParam.iVacuumDelay = ui.spinBoxPickVacDelay_2->value();
- }
- void BondMatrixProgramPage::onSpinBoxPickBlowDelay_2EditingFinished()
- {
- m_curCalibPickParam.iBlowDelay = ui.spinBoxPickBlowDelay_2->value();
- }
- // 处理 "中转台放晶" 控件的槽函数
- void BondMatrixProgramPage::onCheckBoxBondBlockCheckClicked(bool isChecked)
- {
- m_curCalibPlaceParam.bCheckBlock = isChecked;
- // 更新样式
- if (m_curCalibPlaceParam.bCheckBlock == m_tempCalibPlaceParam.bCheckBlock)
- ui.checkBoxBondBlockCheck->setStyleSheet(""); // 恢复默认样式
- else
- ui.checkBoxBondBlockCheck->setStyleSheet("color: red;"); // 字体颜色变红
- if (m_curCalibPlaceParam.iId == m_curWaferPickParam.iId) {
- m_curWaferPickParam.bCheckBlock = isChecked;
- ui.checkBoxPickBlockCheck->setChecked(m_curWaferPickParam.bCheckBlock);
- // 更新样式
- if (m_curWaferPickParam.bCheckBlock == m_tempWaferPickParam.bCheckBlock)
- ui.checkBoxPickBlockCheck->setStyleSheet(""); // 恢复默认样式
- else
- ui.checkBoxPickBlockCheck->setStyleSheet("color: red;"); // 字体颜色变红
- }
- if (m_curCalibPickParam.iId == m_curWaferPickParam.iId) {
- m_curCalibPickParam.bCheckBlock = isChecked;
- ui.checkBoxPickBlockCheck_2->setChecked(m_curCalibPickParam.bCheckBlock);
- // 更新样式
- if (m_curCalibPickParam.bCheckBlock == m_tempCalibPickParam.bCheckBlock)
- ui.checkBoxPickBlockCheck_2->setStyleSheet(""); // 恢复默认样式
- else
- ui.checkBoxPickBlockCheck_2->setStyleSheet("color: red;"); // 字体颜色变红
- }
- if (m_curBondParam.iId == m_curWaferPickParam.iId) {
- m_curBondParam.bCheckBlock = isChecked;
- ui.checkBoxBondBlockCheck_2->setChecked(m_curBondParam.bCheckBlock);
- // 更新样式
- if (m_curBondParam.bCheckBlock == m_tempBondParam.bCheckBlock)
- ui.checkBoxBondBlockCheck_2->setStyleSheet(""); // 恢复默认样式
- else
- ui.checkBoxBondBlockCheck_2->setStyleSheet("color: red;"); // 字体颜色变红
- }
- }
- void BondMatrixProgramPage::onCheckBoxBondLoseCheckClicked(bool isChecked)
- {
- m_curCalibPlaceParam.bCheckLose = isChecked;
- // 更新样式
- if (m_curCalibPlaceParam.bCheckLose == m_tempCalibPlaceParam.bCheckLose)
- ui.checkBoxBondLoseCheck->setStyleSheet(""); // 恢复默认样式
- else
- ui.checkBoxBondLoseCheck->setStyleSheet("color: red;"); // 字体颜色变红
- if (m_curCalibPlaceParam.iId == m_curWaferPickParam.iId) {
- m_curWaferPickParam.bCheckLose = isChecked;
- ui.checkBoxPickLoseCheck->setChecked(m_curWaferPickParam.bCheckLose);
- // 更新样式
- if (m_curWaferPickParam.bCheckLose == m_tempWaferPickParam.bCheckLose)
- ui.checkBoxPickLoseCheck->setStyleSheet(""); // 恢复默认样式
- else
- ui.checkBoxPickLoseCheck->setStyleSheet("color: red;"); // 字体颜色变红
- }
- if (m_curCalibPickParam.iId == m_curWaferPickParam.iId) {
- m_curCalibPickParam.bCheckLose = isChecked;
- ui.checkBoxPickLoseCheck_2->setChecked(m_curCalibPickParam.bCheckLose);
- // 更新样式
- if (m_curCalibPickParam.bCheckLose == m_tempCalibPickParam.bCheckLose)
- ui.checkBoxPickLoseCheck_2->setStyleSheet(""); // 恢复默认样式
- else
- ui.checkBoxPickLoseCheck_2->setStyleSheet("color: red;"); // 字体颜色变红
- }
- if (m_curBondParam.iId == m_curWaferPickParam.iId) {
- m_curBondParam.bCheckLose = isChecked;
- ui.checkBoxBondLoseCheck_2->setChecked(m_curBondParam.bCheckLose);
- // 更新样式
- if (m_curBondParam.bCheckLose == m_tempBondParam.bCheckLose)
- ui.checkBoxBondLoseCheck_2->setStyleSheet(""); // 恢复默认样式
- else
- ui.checkBoxBondLoseCheck_2->setStyleSheet("color: red;"); // 字体颜色变红
- }
- }
- void BondMatrixProgramPage::onCheckBoxBondFindForceClicked(bool isChecked)
- {
- m_curCalibPlaceParam.bFindForce = isChecked;
- ui.doubleSpinBoxBondPosZ->setEnabled(!isChecked);
- // 更新样式
- if (m_curCalibPlaceParam.bFindForce == m_tempCalibPlaceParam.bFindForce)
- ui.checkBoxBondFindForce->setStyleSheet(""); // 恢复默认样式
- else
- ui.checkBoxBondFindForce->setStyleSheet("color: red;"); // 字体颜色变红
- // 同步其他控件并处理样式
- if (m_curCalibPlaceParam.iId == m_curWaferPickParam.iId) {
- m_curWaferPickParam.bFindForce = isChecked;
- ui.checkBoxPickFindForceCheck->setChecked(m_curWaferPickParam.bFindForce);
- // 更新样式
- if (m_curWaferPickParam.bFindForce == m_tempWaferPickParam.bFindForce)
- ui.checkBoxPickFindForceCheck->setStyleSheet(""); // 恢复默认样式
- else
- ui.checkBoxPickFindForceCheck->setStyleSheet("color: red;"); // 字体颜色变红
- ui.doubleSpinBoxPickPosZ->setEnabled(!isChecked);
- }
- if (m_curCalibPickParam.iId == m_curWaferPickParam.iId) {
- m_curCalibPickParam.bFindForce = isChecked;
- ui.checkBoxPickFindForceCheck_2->setChecked(m_curCalibPickParam.bFindForce);
- // 更新样式
- if (m_curCalibPickParam.bFindForce == m_tempCalibPickParam.bFindForce)
- ui.checkBoxPickFindForceCheck_2->setStyleSheet(""); // 恢复默认样式
- else
- ui.checkBoxPickFindForceCheck_2->setStyleSheet("color: red;"); // 字体颜色变红
- ui.doubleSpinBoxPickPosZ_2->setEnabled(!isChecked);
- }
- if (m_curBondParam.iId == m_curWaferPickParam.iId) {
- m_curBondParam.bFindForce = isChecked;
- ui.checkBoxBondFindForce_2->setChecked(m_curBondParam.bFindForce);
- // 更新样式
- if (m_curBondParam.bFindForce == m_tempBondParam.bFindForce)
- ui.checkBoxBondFindForce_2->setStyleSheet(""); // 恢复默认样式
- else
- ui.checkBoxBondFindForce_2->setStyleSheet("color: red;"); // 字体颜色变红
- ui.doubleSpinBoxBondPosZ_2->setEnabled(!isChecked);
- }
- }
- void BondMatrixProgramPage::onDoubleSpinBoxPreBondPosZEditingFinished()
- {
- m_curCalibPlaceParam.dPreLevOffset = ui.doubleSpinBoxPreBondPosZ->value();
- // 更新样式
- if (m_curCalibPlaceParam.dPreLevOffset == m_tempCalibPlaceParam.dPreLevOffset)
- ui.doubleSpinBoxPreBondPosZ->setStyleSheet(""); // 恢复默认样式
- else
- ui.doubleSpinBoxPreBondPosZ->setStyleSheet("color: red;"); // 字体颜色变红
- if (m_curCalibPlaceParam.iId == m_curWaferPickParam.iId) {
- m_curWaferPickParam.dPreLevOffset = ui.doubleSpinBoxPreBondPosZ->value();
- ui.doubleSpinBoxPrePickZ->setValue(m_curWaferPickParam.dPreLevOffset);
- // 更新样式
- if (m_curWaferPickParam.dPreLevOffset == m_tempWaferPickParam.dPreLevOffset)
- ui.doubleSpinBoxPrePickZ->setStyleSheet(""); // 恢复默认样式
- else
- ui.doubleSpinBoxPrePickZ->setStyleSheet("color: red;"); // 字体颜色变红
- }
- if (m_curCalibPickParam.iId == m_curWaferPickParam.iId) {
- m_curCalibPickParam.dPreLevOffset = ui.doubleSpinBoxPreBondPosZ->value();
- ui.doubleSpinBoxPrePickZ_2->setValue(m_curCalibPickParam.dPreLevOffset);
- // 更新样式
- if (m_curCalibPickParam.dPreLevOffset == m_tempCalibPickParam.dPreLevOffset)
- ui.doubleSpinBoxPrePickZ_2->setStyleSheet(""); // 恢复默认样式
- else
- ui.doubleSpinBoxPrePickZ_2->setStyleSheet("color: red;"); // 字体颜色变红
- }
- if (m_curBondParam.iId == m_curWaferPickParam.iId) {
- m_curBondParam.dPreLevOffset = ui.doubleSpinBoxPreBondPosZ->value();
- ui.doubleSpinBoxPreBondPosZ_2->setValue(m_curBondParam.dPreLevOffset);
- // 更新样式
- if (m_curBondParam.dPreLevOffset == m_tempBondParam.dPreLevOffset)
- ui.doubleSpinBoxPreBondPosZ_2->setStyleSheet(""); // 恢复默认样式
- else
- ui.doubleSpinBoxPreBondPosZ_2->setStyleSheet("color: red;"); // 字体颜色变红
- }
- }
- void BondMatrixProgramPage::onDoubleSpinBoxBondForceEditingFinished()
- {
- m_curCalibPlaceParam.dForce = ui.doubleSpinBoxBondForce->value();
- // 更新样式
- if (m_curCalibPlaceParam.dForce == m_tempCalibPlaceParam.dForce)
- ui.doubleSpinBoxBondForce->setStyleSheet(""); // 恢复默认样式
- else
- ui.doubleSpinBoxBondForce->setStyleSheet("color: red;"); // 字体颜色变红
- // 同步其他控件并处理样式
- if (m_curCalibPlaceParam.iId == m_curWaferPickParam.iId) {
- m_curWaferPickParam.dForce = ui.doubleSpinBoxBondForce->value();
- ui.doubleSpinBoxPickForce->setValue(m_curWaferPickParam.dForce);
- // 更新样式
- if (m_curWaferPickParam.dForce == m_tempWaferPickParam.dForce)
- ui.doubleSpinBoxPickForce->setStyleSheet(""); // 恢复默认样式
- else
- ui.doubleSpinBoxPickForce->setStyleSheet("color: red;"); // 字体颜色变红
- }
- if (m_curCalibPickParam.iId == m_curWaferPickParam.iId) {
- m_curCalibPickParam.dForce = ui.doubleSpinBoxBondForce->value();
- ui.doubleSpinBoxPickForce_2->setValue(m_curCalibPickParam.dForce);
- // 更新样式
- if (m_curCalibPickParam.dForce == m_tempCalibPickParam.dForce)
- ui.doubleSpinBoxPickForce_2->setStyleSheet(""); // 恢复默认样式
- else
- ui.doubleSpinBoxPickForce_2->setStyleSheet("color: red;"); // 字体颜色变红
- }
- if (m_curBondParam.iId == m_curWaferPickParam.iId) {
- m_curBondParam.dForce = ui.doubleSpinBoxBondForce->value();
- ui.doubleSpinBoxBondForce_2->setValue(m_curBondParam.dForce);
- // 更新样式
- if (m_curBondParam.dForce == m_tempBondParam.dForce)
- ui.doubleSpinBoxBondForce_2->setStyleSheet(""); // 恢复默认样式
- else
- ui.doubleSpinBoxBondForce_2->setStyleSheet("color: red;"); // 字体颜色变红
- }
- }
- void BondMatrixProgramPage::onDoubleSpinBoxBondPosZEditingFinished()
- {
- m_curCalibPlaceParam.dWorkLevOffset = ui.doubleSpinBoxBondPosZ->value();
- // 更新样式
- if (m_curCalibPlaceParam.dWorkLevOffset == m_tempCalibPlaceParam.dWorkLevOffset)
- ui.doubleSpinBoxBondPosZ->setStyleSheet(""); // 恢复默认样式
- else
- ui.doubleSpinBoxBondPosZ->setStyleSheet("color: red;"); // 字体颜色变红
- // 同步其他控件并处理样式
- if (m_curCalibPlaceParam.iId == m_curWaferPickParam.iId) {
- m_curWaferPickParam.dWorkLevOffset = ui.doubleSpinBoxBondPosZ->value();
- ui.doubleSpinBoxPickPosZ->setValue(m_curWaferPickParam.dWorkLevOffset);
- // 更新样式
- if (m_curWaferPickParam.dWorkLevOffset == m_tempWaferPickParam.dWorkLevOffset)
- ui.doubleSpinBoxPickPosZ->setStyleSheet(""); // 恢复默认样式
- else
- ui.doubleSpinBoxPickPosZ->setStyleSheet("color: red;"); // 字体颜色变红
- }
- if (m_curCalibPickParam.iId == m_curWaferPickParam.iId) {
- m_curCalibPickParam.dWorkLevOffset = ui.doubleSpinBoxBondPosZ->value();
- ui.doubleSpinBoxPickPosZ_2->setValue(m_curCalibPickParam.dWorkLevOffset);
- // 更新样式
- if (m_curCalibPickParam.dWorkLevOffset == m_tempCalibPickParam.dWorkLevOffset)
- ui.doubleSpinBoxPickPosZ_2->setStyleSheet(""); // 恢复默认样式
- else
- ui.doubleSpinBoxPickPosZ_2->setStyleSheet("color: red;"); // 字体颜色变红
- }
- if (m_curBondParam.iId == m_curWaferPickParam.iId) {
- m_curBondParam.dWorkLevOffset = ui.doubleSpinBoxBondPosZ->value();
- ui.doubleSpinBoxBondPosZ_2->setValue(m_curBondParam.dWorkLevOffset);
- // 更新样式
- if (m_curBondParam.dWorkLevOffset == m_tempBondParam.dWorkLevOffset)
- ui.doubleSpinBoxBondPosZ_2->setStyleSheet(""); // 恢复默认样式
- else
- ui.doubleSpinBoxBondPosZ_2->setStyleSheet("color: red;"); // 字体颜色变红
- }
- }
- void BondMatrixProgramPage::onSpinBoxBondGrabDelayEditingFinished()
- {
- m_curCalibPlaceParam.iGrabDelay = ui.spinBoxBondGrabDelay->value();
- // 更新样式
- if (m_curCalibPlaceParam.iGrabDelay == m_tempCalibPlaceParam.iGrabDelay)
- ui.spinBoxBondGrabDelay->setStyleSheet(""); // 恢复默认样式
- else
- ui.spinBoxBondGrabDelay->setStyleSheet("color: red;"); // 字体颜色变红
- // 同步其他控件并处理样式
- if (m_curCalibPlaceParam.iId == m_curWaferPickParam.iId) {
- m_curWaferPickParam.iGrabDelay = ui.spinBoxBondGrabDelay->value();
- ui.spinBoxPickGrabDelay->setValue(m_curWaferPickParam.iGrabDelay);
- // 更新样式
- if (m_curWaferPickParam.iGrabDelay == m_tempWaferPickParam.iGrabDelay)
- ui.spinBoxPickGrabDelay->setStyleSheet(""); // 恢复默认样式
- else
- ui.spinBoxPickGrabDelay->setStyleSheet("color: red;"); // 字体颜色变红
- }
- if (m_curCalibPickParam.iId == m_curWaferPickParam.iId) {
- m_curCalibPickParam.iGrabDelay = ui.spinBoxBondGrabDelay->value();
- ui.spinBoxPickGrabDelay_2->setValue(m_curCalibPickParam.iGrabDelay);
- // 更新样式
- if (m_curCalibPickParam.iGrabDelay == m_tempCalibPickParam.iGrabDelay)
- ui.spinBoxPickGrabDelay_2->setStyleSheet(""); // 恢复默认样式
- else
- ui.spinBoxPickGrabDelay_2->setStyleSheet("color: red;"); // 字体颜色变红
- }
- if (m_curBondParam.iId == m_curWaferPickParam.iId) {
- m_curBondParam.iGrabDelay = ui.spinBoxBondGrabDelay->value();
- ui.spinBoxBondGrabDelay_2->setValue(m_curBondParam.iGrabDelay);
- // 更新样式
- if (m_curBondParam.iGrabDelay == m_tempBondParam.iGrabDelay)
- ui.spinBoxBondGrabDelay_2->setStyleSheet(""); // 恢复默认样式
- else
- ui.spinBoxBondGrabDelay_2->setStyleSheet("color: red;"); // 字体颜色变红
- }
- }
- void BondMatrixProgramPage::onSpinBoxBondBlockCheckDelayEditingFinished()
- {
- m_curCalibPlaceParam.iBlockOrLoseDelay = ui.spinBoxBondBlockCheckDelay->value();
- // 更新样式
- if (m_curCalibPlaceParam.iBlockOrLoseDelay == m_tempCalibPlaceParam.iBlockOrLoseDelay)
- ui.spinBoxBondBlockCheckDelay->setStyleSheet(""); // 恢复默认样式
- else
- ui.spinBoxBondBlockCheckDelay->setStyleSheet("color: red;"); // 字体颜色变红
- // 同步其他控件并处理样式
- if (m_curCalibPlaceParam.iId == m_curWaferPickParam.iId) {
- m_curWaferPickParam.iBlockOrLoseDelay = ui.spinBoxBondBlockCheckDelay->value();
- ui.spinBoxPickBlockCheckDelay->setValue(m_curWaferPickParam.iBlockOrLoseDelay);
- // 更新样式
- if (m_curWaferPickParam.iBlockOrLoseDelay == m_tempWaferPickParam.iBlockOrLoseDelay)
- ui.spinBoxPickBlockCheckDelay->setStyleSheet(""); // 恢复默认样式
- else
- ui.spinBoxPickBlockCheckDelay->setStyleSheet("color: red;"); // 字体颜色变红
- }
- if (m_curCalibPickParam.iId == m_curWaferPickParam.iId) {
- m_curCalibPickParam.iBlockOrLoseDelay = ui.spinBoxBondBlockCheckDelay->value();
- ui.spinBoxPickBlockCheckDelay_2->setValue(m_curCalibPickParam.iBlockOrLoseDelay);
- // 更新样式
- if (m_curCalibPickParam.iBlockOrLoseDelay == m_tempCalibPickParam.iBlockOrLoseDelay)
- ui.spinBoxPickBlockCheckDelay_2->setStyleSheet(""); // 恢复默认样式
- else
- ui.spinBoxPickBlockCheckDelay_2->setStyleSheet("color: red;"); // 字体颜色变红
- }
- if (m_curBondParam.iId == m_curWaferPickParam.iId) {
- m_curBondParam.iBlockOrLoseDelay = ui.spinBoxBondBlockCheckDelay->value();
- ui.spinBoxBondBlockCheckDelay_2->setValue(m_curBondParam.iBlockOrLoseDelay);
- // 更新样式
- if (m_curBondParam.iBlockOrLoseDelay == m_tempBondParam.iBlockOrLoseDelay)
- ui.spinBoxBondBlockCheckDelay_2->setStyleSheet(""); // 恢复默认样式
- else
- ui.spinBoxBondBlockCheckDelay_2->setStyleSheet("color: red;"); // 字体颜色变红
- }
- }
- void BondMatrixProgramPage::onSpinBoxBondDelayEditingFinished()
- {
- m_curCalibPlaceParam.iPickOrBondDelay = ui.spinBoxBondDelay->value();
- // 更新样式
- if (m_curCalibPlaceParam.iPickOrBondDelay == m_tempCalibPlaceParam.iPickOrBondDelay)
- ui.spinBoxBondDelay->setStyleSheet(""); // 恢复默认样式
- else
- ui.spinBoxBondDelay->setStyleSheet("color: red;"); // 字体颜色变红
- // 同步其他控件并处理样式
- if (m_curCalibPlaceParam.iId == m_curWaferPickParam.iId) {
- m_curWaferPickParam.iPickOrBondDelay = ui.spinBoxBondDelay->value();
- ui.spinBoxPickDelay->setValue(m_curWaferPickParam.iPickOrBondDelay);
- // 更新样式
- if (m_curWaferPickParam.iPickOrBondDelay == m_tempWaferPickParam.iPickOrBondDelay)
- ui.spinBoxPickDelay->setStyleSheet(""); // 恢复默认样式
- else
- ui.spinBoxPickDelay->setStyleSheet("color: red;"); // 字体颜色变红
- }
- if (m_curCalibPickParam.iId == m_curWaferPickParam.iId) {
- m_curCalibPickParam.iPickOrBondDelay = ui.spinBoxBondDelay->value();
- ui.spinBoxPickDelay_2->setValue(m_curCalibPickParam.iPickOrBondDelay);
- // 更新样式
- if (m_curCalibPickParam.iPickOrBondDelay == m_tempCalibPickParam.iPickOrBondDelay)
- ui.spinBoxPickDelay_2->setStyleSheet(""); // 恢复默认样式
- else
- ui.spinBoxPickDelay_2->setStyleSheet("color: red;"); // 字体颜色变红
- }
- if (m_curBondParam.iId == m_curWaferPickParam.iId) {
- m_curBondParam.iPickOrBondDelay = ui.spinBoxBondDelay->value();
- ui.spinBoxBondDelay_2->setValue(m_curBondParam.iPickOrBondDelay);
- // 更新样式
- if (m_curBondParam.iPickOrBondDelay == m_tempBondParam.iPickOrBondDelay)
- ui.spinBoxBondDelay_2->setStyleSheet(""); // 恢复默认样式
- else
- ui.spinBoxBondDelay_2->setStyleSheet("color: red;"); // 字体颜色变红
- }
- }
- void BondMatrixProgramPage::onSpinBoxBondVacDelayEditingFinished()
- {
- m_curCalibPlaceParam.iVacuumDelay = ui.spinBoxBondVacDelay->value();
- // 更新样式
- if (m_curCalibPlaceParam.iVacuumDelay == m_tempCalibPlaceParam.iVacuumDelay)
- ui.spinBoxBondVacDelay->setStyleSheet(""); // 恢复默认样式
- else
- ui.spinBoxBondVacDelay->setStyleSheet("color: red;"); // 字体颜色变红
- // 同步其他控件并处理样式
- if (m_curCalibPlaceParam.iId == m_curWaferPickParam.iId) {
- m_curWaferPickParam.iVacuumDelay = ui.spinBoxBondVacDelay->value();
- ui.spinBoxPickVacDelay->setValue(m_curWaferPickParam.iVacuumDelay);
- // 更新样式
- if (m_curWaferPickParam.iVacuumDelay == m_tempWaferPickParam.iVacuumDelay)
- ui.spinBoxPickVacDelay->setStyleSheet(""); // 恢复默认样式
- else
- ui.spinBoxPickVacDelay->setStyleSheet("color: red;"); // 字体颜色变红
- }
- if (m_curCalibPickParam.iId == m_curWaferPickParam.iId) {
- m_curCalibPickParam.iVacuumDelay = ui.spinBoxBondVacDelay->value();
- ui.spinBoxPickVacDelay_2->setValue(m_curCalibPickParam.iVacuumDelay);
- // 更新样式
- if (m_curCalibPickParam.iVacuumDelay == m_tempCalibPickParam.iVacuumDelay)
- ui.spinBoxPickVacDelay_2->setStyleSheet(""); // 恢复默认样式
- else
- ui.spinBoxPickVacDelay_2->setStyleSheet("color: red;"); // 字体颜色变红
- }
- if (m_curBondParam.iId == m_curWaferPickParam.iId) {
- m_curBondParam.iVacuumDelay = ui.spinBoxBondVacDelay->value();
- ui.spinBoxBondVacDelay_2->setValue(m_curBondParam.iVacuumDelay);
- // 更新样式
- if (m_curBondParam.iVacuumDelay == m_tempBondParam.iVacuumDelay)
- ui.spinBoxBondVacDelay_2->setStyleSheet(""); // 恢复默认样式
- else
- ui.spinBoxBondVacDelay_2->setStyleSheet("color: red;"); // 字体颜色变红
- }
- }
- void BondMatrixProgramPage::onSpinBoxBondBlowDelayEditingFinished()
- {
- m_curCalibPlaceParam.iBlowDelay = ui.spinBoxBondBlowDelay->value();
- // 更新样式
- if (m_curCalibPlaceParam.iBlowDelay == m_tempCalibPlaceParam.iBlowDelay)
- ui.spinBoxBondBlowDelay->setStyleSheet(""); // 恢复默认样式
- else
- ui.spinBoxBondBlowDelay->setStyleSheet("color: red;"); // 字体颜色变红
- // 同步其他控件并处理样式
- if (m_curCalibPlaceParam.iId == m_curWaferPickParam.iId) {
- m_curWaferPickParam.iBlowDelay = ui.spinBoxBondBlowDelay->value();
- ui.spinBoxPickBlowDelay->setValue(m_curWaferPickParam.iBlowDelay);
- // 更新样式
- if (m_curWaferPickParam.iBlowDelay == m_tempWaferPickParam.iBlowDelay)
- ui.spinBoxPickBlowDelay->setStyleSheet(""); // 恢复默认样式
- else
- ui.spinBoxPickBlowDelay->setStyleSheet("color: red;"); // 字体颜色变红
- }
- if (m_curCalibPickParam.iId == m_curWaferPickParam.iId) {
- m_curCalibPickParam.iBlowDelay = ui.spinBoxBondBlowDelay->value();
- ui.spinBoxPickBlowDelay_2->setValue(m_curCalibPickParam.iBlowDelay);
- // 更新样式
- if (m_curCalibPickParam.iBlowDelay == m_tempCalibPickParam.iBlowDelay)
- ui.spinBoxPickBlowDelay_2->setStyleSheet(""); // 恢复默认样式
- else
- ui.spinBoxPickBlowDelay_2->setStyleSheet("color: red;"); // 字体颜色变红
- }
- if (m_curBondParam.iId == m_curWaferPickParam.iId) {
- m_curBondParam.iBlowDelay = ui.spinBoxBondBlowDelay->value();
- ui.spinBoxBondBlowDelay_2->setValue(m_curBondParam.iBlowDelay);
- // 更新样式
- if (m_curBondParam.iBlowDelay == m_tempBondParam.iBlowDelay)
- ui.spinBoxBondBlowDelay_2->setStyleSheet(""); // 恢复默认样式
- else
- ui.spinBoxBondBlowDelay_2->setStyleSheet("color: red;"); // 字体颜色变红
- }
- }
- // 处理 "固晶台固晶" 控件的槽函数
- void BondMatrixProgramPage::onCheckBoxBondBlockCheck_2Clicked(bool isChecked)
- {
- m_curBondParam.bCheckBlock = isChecked;
- // 更新样式
- if (m_curBondParam.bCheckBlock == m_tempBondParam.bCheckBlock)
- ui.checkBoxBondBlockCheck_2->setStyleSheet(""); // 恢复默认样式
- else
- ui.checkBoxBondBlockCheck_2->setStyleSheet("color: red;"); // 字体颜色变红
- if (m_curBondParam.iId == m_curWaferPickParam.iId) {
- m_curWaferPickParam.bCheckBlock = isChecked;
- ui.checkBoxPickBlockCheck->setChecked(m_curWaferPickParam.bCheckBlock);
- // 更新样式
- if (m_curWaferPickParam.bCheckBlock == m_tempWaferPickParam.bCheckBlock)
- ui.checkBoxPickBlockCheck->setStyleSheet(""); // 恢复默认样式
- else
- ui.checkBoxPickBlockCheck->setStyleSheet("color: red;"); // 字体颜色变红
- }
- if (m_curCalibPickParam.iId == m_curBondParam.iId) {
- m_curCalibPickParam.bCheckBlock = isChecked;
- ui.checkBoxPickBlockCheck_2->setChecked(m_curCalibPickParam.bCheckBlock);
- // 更新样式
- if (m_curCalibPickParam.bCheckBlock == m_tempCalibPickParam.bCheckBlock)
- ui.checkBoxPickBlockCheck_2->setStyleSheet(""); // 恢复默认样式
- else
- ui.checkBoxPickBlockCheck_2->setStyleSheet("color: red;"); // 字体颜色变红
- }
- if (m_curCalibPlaceParam.iId == m_curBondParam.iId) {
- m_curCalibPlaceParam.bCheckBlock = isChecked;
- ui.checkBoxBondBlockCheck->setChecked(m_curCalibPlaceParam.bCheckBlock);
- // 更新样式
- if (m_curCalibPlaceParam.bCheckBlock == m_tempCalibPlaceParam.bCheckBlock)
- ui.checkBoxBondBlockCheck->setStyleSheet(""); // 恢复默认样式
- else
- ui.checkBoxBondBlockCheck->setStyleSheet("color: red;"); // 字体颜色变红
- }
- }
- void BondMatrixProgramPage::onCheckBoxBondLoseCheck_2Clicked(bool isChecked)
- {
- m_curBondParam.bCheckLose = isChecked;
- // 更新样式
- if (m_curBondParam.bCheckLose == m_tempBondParam.bCheckLose)
- ui.checkBoxBondLoseCheck_2->setStyleSheet(""); // 恢复默认样式
- else
- ui.checkBoxBondLoseCheck_2->setStyleSheet("color: red;"); // 字体颜色变红
- if (m_curBondParam.iId == m_curWaferPickParam.iId) {
- m_curWaferPickParam.bCheckLose = isChecked;
- ui.checkBoxPickLoseCheck->setChecked(m_curWaferPickParam.bCheckLose);
- // 更新样式
- if (m_curWaferPickParam.bCheckLose == m_tempWaferPickParam.bCheckLose)
- ui.checkBoxPickLoseCheck->setStyleSheet(""); // 恢复默认样式
- else
- ui.checkBoxPickLoseCheck->setStyleSheet("color: red;"); // 字体颜色变红
- }
- if (m_curCalibPickParam.iId == m_curBondParam.iId) {
- m_curCalibPickParam.bCheckLose = isChecked;
- ui.checkBoxPickLoseCheck_2->setChecked(m_curCalibPickParam.bCheckLose);
- // 更新样式
- if (m_curCalibPickParam.bCheckLose == m_tempCalibPickParam.bCheckLose)
- ui.checkBoxPickLoseCheck_2->setStyleSheet(""); // 恢复默认样式
- else
- ui.checkBoxPickLoseCheck_2->setStyleSheet("color: red;"); // 字体颜色变红
- }
- if (m_curCalibPlaceParam.iId == m_curBondParam.iId) {
- m_curCalibPlaceParam.bCheckLose = isChecked;
- ui.checkBoxBondLoseCheck->setChecked(m_curCalibPlaceParam.bCheckLose);
- // 更新样式
- if (m_curCalibPlaceParam.bCheckLose == m_tempCalibPlaceParam.bCheckLose)
- ui.checkBoxBondLoseCheck->setStyleSheet(""); // 恢复默认样式
- else
- ui.checkBoxBondLoseCheck->setStyleSheet("color: red;"); // 字体颜色变红
- }
- }
- void BondMatrixProgramPage::onCheckBoxBondFindForce_2Clicked(bool isChecked)
- {
- m_curBondParam.bFindForce = isChecked;
- ui.doubleSpinBoxBondPosZ_2->setEnabled(!isChecked);
- // 更新样式
- if (m_curBondParam.bFindForce == m_tempBondParam.bFindForce)
- ui.checkBoxBondFindForce_2->setStyleSheet(""); // 恢复默认样式
- else
- ui.checkBoxBondFindForce_2->setStyleSheet("color: red;"); // 字体颜色变红
- // 同步其他控件并处理样式
- if (m_curBondParam.iId == m_curWaferPickParam.iId) {
- m_curWaferPickParam.bFindForce = isChecked;
- ui.checkBoxPickFindForceCheck->setChecked(m_curWaferPickParam.bFindForce);
- // 更新样式
- if (m_curWaferPickParam.bFindForce == m_tempWaferPickParam.bFindForce)
- ui.checkBoxPickFindForceCheck->setStyleSheet(""); // 恢复默认样式
- else
- ui.checkBoxPickFindForceCheck->setStyleSheet("color: red;"); // 字体颜色变红
- ui.doubleSpinBoxPickPosZ->setEnabled(!isChecked);
- }
- if (m_curCalibPickParam.iId == m_curBondParam.iId) {
- m_curCalibPickParam.bFindForce = isChecked;
- ui.checkBoxPickFindForceCheck_2->setChecked(m_curCalibPickParam.bFindForce);
- // 更新样式
- if (m_curCalibPickParam.bFindForce == m_tempCalibPickParam.bFindForce)
- ui.checkBoxPickFindForceCheck_2->setStyleSheet(""); // 恢复默认样式
- else
- ui.checkBoxPickFindForceCheck_2->setStyleSheet("color: red;"); // 字体颜色变红
- ui.doubleSpinBoxPickPosZ_2->setEnabled(!isChecked);
- }
- if (m_curCalibPlaceParam.iId == m_curBondParam.iId) {
- m_curCalibPlaceParam.bFindForce = isChecked;
- ui.checkBoxBondFindForce->setChecked(m_curCalibPlaceParam.bFindForce);
- // 更新样式
- if (m_curCalibPlaceParam.bFindForce == m_tempCalibPlaceParam.bFindForce)
- ui.checkBoxBondFindForce->setStyleSheet(""); // 恢复默认样式
- else
- ui.checkBoxBondFindForce->setStyleSheet("color: red;"); // 字体颜色变红
- ui.doubleSpinBoxBondPosZ->setEnabled(!isChecked);
- }
- }
- void BondMatrixProgramPage::onDoubleSpinBoxPreBondPosZ_2EditingFinished()
- {
- m_curBondParam.dPreLevOffset = ui.doubleSpinBoxPreBondPosZ_2->value();
- // 更新样式
- if (m_curBondParam.dPreLevOffset == m_tempBondParam.dPreLevOffset)
- ui.doubleSpinBoxPreBondPosZ_2->setStyleSheet(""); // 恢复默认样式
- else
- ui.doubleSpinBoxPreBondPosZ_2->setStyleSheet("color: red;"); // 字体颜色变红
- // 同步其他控件并处理样式
- if (m_curBondParam.iId == m_curWaferPickParam.iId) {
- m_curWaferPickParam.dPreLevOffset = ui.doubleSpinBoxPreBondPosZ_2->value();
- ui.doubleSpinBoxPrePickZ->setValue(m_curWaferPickParam.dPreLevOffset);
- // 更新样式
- if (m_curWaferPickParam.dPreLevOffset == m_tempWaferPickParam.dPreLevOffset)
- ui.doubleSpinBoxPrePickZ->setStyleSheet(""); // 恢复默认样式
- else
- ui.doubleSpinBoxPrePickZ->setStyleSheet("color: red;"); // 字体颜色变红
- }
- if (m_curCalibPickParam.iId == m_curBondParam.iId) {
- m_curCalibPickParam.dPreLevOffset = ui.doubleSpinBoxPreBondPosZ_2->value();
- ui.doubleSpinBoxPrePickZ_2->setValue(m_curCalibPickParam.dPreLevOffset);
- // 更新样式
- if (m_curCalibPickParam.dPreLevOffset == m_tempCalibPickParam.dPreLevOffset)
- ui.doubleSpinBoxPrePickZ_2->setStyleSheet(""); // 恢复默认样式
- else
- ui.doubleSpinBoxPrePickZ_2->setStyleSheet("color: red;"); // 字体颜色变红
- }
- if (m_curCalibPlaceParam.iId == m_curBondParam.iId) {
- m_curCalibPlaceParam.dPreLevOffset = ui.doubleSpinBoxPreBondPosZ_2->value();
- ui.doubleSpinBoxPreBondPosZ->setValue(m_curCalibPlaceParam.dPreLevOffset);
- // 更新样式
- if (m_curCalibPlaceParam.dPreLevOffset == m_tempCalibPlaceParam.dPreLevOffset)
- ui.doubleSpinBoxPreBondPosZ->setStyleSheet(""); // 恢复默认样式
- else
- ui.doubleSpinBoxPreBondPosZ->setStyleSheet("color: red;"); // 字体颜色变红
- }
- }
- void BondMatrixProgramPage::onDoubleSpinBoxBondForce_2EditingFinished()
- {
- m_curBondParam.dForce = ui.doubleSpinBoxBondForce_2->value();
- // 更新样式
- if (m_curBondParam.dForce == m_tempBondParam.dForce)
- ui.doubleSpinBoxBondForce_2->setStyleSheet(""); // 恢复默认样式
- else
- ui.doubleSpinBoxBondForce_2->setStyleSheet("color: red;"); // 字体颜色变红
- // 同步其他控件并处理样式
- if (m_curBondParam.iId == m_curWaferPickParam.iId) {
- m_curWaferPickParam.dForce = ui.doubleSpinBoxBondForce_2->value();
- ui.doubleSpinBoxPickForce->setValue(m_curWaferPickParam.dForce);
- // 更新样式
- if (m_curWaferPickParam.dForce == m_tempWaferPickParam.dForce)
- ui.doubleSpinBoxPickForce->setStyleSheet(""); // 恢复默认样式
- else
- ui.doubleSpinBoxPickForce->setStyleSheet("color: red;"); // 字体颜色变红
- }
- if (m_curCalibPickParam.iId == m_curBondParam.iId) {
- m_curCalibPickParam.dForce = ui.doubleSpinBoxBondForce_2->value();
- ui.doubleSpinBoxPickForce_2->setValue(m_curCalibPickParam.dForce);
- // 更新样式
- if (m_curCalibPickParam.dForce == m_tempCalibPickParam.dForce)
- ui.doubleSpinBoxPickForce_2->setStyleSheet(""); // 恢复默认样式
- else
- ui.doubleSpinBoxPickForce_2->setStyleSheet("color: red;"); // 字体颜色变红
- }
- if (m_curCalibPlaceParam.iId == m_curBondParam.iId) {
- m_curCalibPlaceParam.dForce = ui.doubleSpinBoxBondForce_2->value();
- ui.doubleSpinBoxBondForce->setValue(m_curCalibPlaceParam.dForce);
- // 更新样式
- if (m_curCalibPlaceParam.dForce == m_tempCalibPlaceParam.dForce)
- ui.doubleSpinBoxBondForce->setStyleSheet(""); // 恢复默认样式
- else
- ui.doubleSpinBoxBondForce->setStyleSheet("color: red;"); // 字体颜色变红
- }
- }
- void BondMatrixProgramPage::onDoubleSpinBoxBondPosZ_2EditingFinished()
- {
- m_curBondParam.dWorkLevOffset = ui.doubleSpinBoxBondPosZ_2->value();
- // 更新样式
- if (m_curBondParam.dWorkLevOffset == m_tempBondParam.dWorkLevOffset)
- ui.doubleSpinBoxBondPosZ_2->setStyleSheet(""); // 恢复默认样式
- else
- ui.doubleSpinBoxBondPosZ_2->setStyleSheet("color: red;"); // 字体颜色变红
- // 同步其他控件并处理样式
- if (m_curBondParam.iId == m_curWaferPickParam.iId) {
- m_curWaferPickParam.dWorkLevOffset = ui.doubleSpinBoxBondPosZ_2->value();
- ui.doubleSpinBoxPickPosZ->setValue(m_curWaferPickParam.dWorkLevOffset);
- // 更新样式
- if (m_curWaferPickParam.dWorkLevOffset == m_tempWaferPickParam.dWorkLevOffset)
- ui.doubleSpinBoxPickPosZ->setStyleSheet(""); // 恢复默认样式
- else
- ui.doubleSpinBoxPickPosZ->setStyleSheet("color: red;"); // 字体颜色变红
- }
- if (m_curCalibPickParam.iId == m_curBondParam.iId) {
- m_curCalibPickParam.dWorkLevOffset = ui.doubleSpinBoxBondPosZ_2->value();
- ui.doubleSpinBoxPickPosZ_2->setValue(m_curCalibPickParam.dWorkLevOffset);
- // 更新样式
- if (m_curCalibPickParam.dWorkLevOffset == m_tempCalibPickParam.dWorkLevOffset)
- ui.doubleSpinBoxPickPosZ_2->setStyleSheet(""); // 恢复默认样式
- else
- ui.doubleSpinBoxPickPosZ_2->setStyleSheet("color: red;"); // 字体颜色变红
- }
- if (m_curCalibPlaceParam.iId == m_curBondParam.iId) {
- m_curCalibPlaceParam.dWorkLevOffset = ui.doubleSpinBoxBondPosZ_2->value();
- ui.doubleSpinBoxBondPosZ->setValue(m_curCalibPlaceParam.dWorkLevOffset);
- // 更新样式
- if (m_curCalibPlaceParam.dWorkLevOffset == m_tempCalibPlaceParam.dWorkLevOffset)
- ui.doubleSpinBoxBondPosZ->setStyleSheet(""); // 恢复默认样式
- else
- ui.doubleSpinBoxBondPosZ->setStyleSheet("color: red;"); // 字体颜色变红
- }
- }
- void BondMatrixProgramPage::onSpinBoxBondGrabDelay_2EditingFinished()
- {
- m_curBondParam.iGrabDelay = ui.spinBoxBondGrabDelay_2->value();
- // 更新样式
- if (m_curBondParam.iGrabDelay == m_tempBondParam.iGrabDelay)
- ui.spinBoxBondGrabDelay_2->setStyleSheet(""); // 恢复默认样式
- else
- ui.spinBoxBondGrabDelay_2->setStyleSheet("color: red;"); // 字体颜色变红
- // 同步其他控件并处理样式
- if (m_curBondParam.iId == m_curWaferPickParam.iId) {
- m_curWaferPickParam.iGrabDelay = ui.spinBoxBondGrabDelay_2->value();
- ui.spinBoxPickGrabDelay->setValue(m_curWaferPickParam.iGrabDelay);
- // 更新样式
- if (m_curWaferPickParam.iGrabDelay == m_tempWaferPickParam.iGrabDelay)
- ui.spinBoxPickGrabDelay->setStyleSheet(""); // 恢复默认样式
- else
- ui.spinBoxPickGrabDelay->setStyleSheet("color: red;"); // 字体颜色变红
- }
- if (m_curCalibPickParam.iId == m_curBondParam.iId) {
- m_curCalibPickParam.iGrabDelay = ui.spinBoxBondGrabDelay_2->value();
- ui.spinBoxPickGrabDelay_2->setValue(m_curCalibPickParam.iGrabDelay);
- // 更新样式
- if (m_curCalibPickParam.iGrabDelay == m_tempCalibPickParam.iGrabDelay)
- ui.spinBoxPickGrabDelay_2->setStyleSheet(""); // 恢复默认样式
- else
- ui.spinBoxPickGrabDelay_2->setStyleSheet("color: red;"); // 字体颜色变红
- }
- if (m_curCalibPlaceParam.iId == m_curBondParam.iId) {
- m_curCalibPlaceParam.iGrabDelay = ui.spinBoxBondGrabDelay_2->value();
- ui.spinBoxBondGrabDelay->setValue(m_curCalibPlaceParam.iGrabDelay);
- // 更新样式
- if (m_curCalibPlaceParam.iGrabDelay == m_tempCalibPlaceParam.iGrabDelay)
- ui.spinBoxBondGrabDelay->setStyleSheet(""); // 恢复默认样式
- else
- ui.spinBoxBondGrabDelay->setStyleSheet("color: red;"); // 字体颜色变红
- }
- }
- void BondMatrixProgramPage::onSpinBoxBondBlockCheckDelay_2EditingFinished()
- {
- m_curBondParam.iBlockOrLoseDelay = ui.spinBoxBondBlockCheckDelay_2->value();
- // 更新样式
- if (m_curBondParam.iBlockOrLoseDelay == m_tempBondParam.iBlockOrLoseDelay)
- ui.spinBoxBondBlockCheckDelay_2->setStyleSheet(""); // 恢复默认样式
- else
- ui.spinBoxBondBlockCheckDelay_2->setStyleSheet("color: red;"); // 字体颜色变红
- // 同步其他控件并处理样式
- if (m_curBondParam.iId == m_curWaferPickParam.iId) {
- m_curWaferPickParam.iBlockOrLoseDelay = ui.spinBoxBondBlockCheckDelay_2->value();
- ui.spinBoxPickBlockCheckDelay->setValue(m_curWaferPickParam.iBlockOrLoseDelay);
- // 更新样式
- if (m_curWaferPickParam.iBlockOrLoseDelay == m_tempWaferPickParam.iBlockOrLoseDelay)
- ui.spinBoxPickBlockCheckDelay->setStyleSheet(""); // 恢复默认样式
- else
- ui.spinBoxPickBlockCheckDelay->setStyleSheet("color: red;"); // 字体颜色变红
- }
- if (m_curCalibPickParam.iId == m_curBondParam.iId) {
- m_curCalibPickParam.iBlockOrLoseDelay = ui.spinBoxBondBlockCheckDelay_2->value();
- ui.spinBoxPickBlockCheckDelay_2->setValue(m_curCalibPickParam.iBlockOrLoseDelay);
- // 更新样式
- if (m_curCalibPickParam.iBlockOrLoseDelay == m_tempCalibPickParam.iBlockOrLoseDelay)
- ui.spinBoxPickBlockCheckDelay_2->setStyleSheet(""); // 恢复默认样式
- else
- ui.spinBoxPickBlockCheckDelay_2->setStyleSheet("color: red;"); // 字体颜色变红
- }
- if (m_curCalibPlaceParam.iId == m_curBondParam.iId) {
- m_curCalibPlaceParam.iBlockOrLoseDelay = ui.spinBoxBondBlockCheckDelay_2->value();
- ui.spinBoxBondBlockCheckDelay->setValue(m_curCalibPlaceParam.iBlockOrLoseDelay);
- // 更新样式
- if (m_curCalibPlaceParam.iBlockOrLoseDelay == m_tempCalibPlaceParam.iBlockOrLoseDelay)
- ui.spinBoxBondBlockCheckDelay->setStyleSheet(""); // 恢复默认样式
- else
- ui.spinBoxBondBlockCheckDelay->setStyleSheet("color: red;"); // 字体颜色变红
- }
- }
- void BondMatrixProgramPage::onSpinBoxBondDelay_2EditingFinished()
- {
- m_curBondParam.iPickOrBondDelay = ui.spinBoxBondDelay_2->value();
- // 更新样式
- if (m_curBondParam.iPickOrBondDelay == m_tempBondParam.iPickOrBondDelay)
- ui.spinBoxBondDelay_2->setStyleSheet(""); // 恢复默认样式
- else
- ui.spinBoxBondDelay_2->setStyleSheet("color: red;"); // 字体颜色变红
- // 同步其他控件并处理样式
- if (m_curBondParam.iId == m_curWaferPickParam.iId) {
- m_curWaferPickParam.iPickOrBondDelay = ui.spinBoxBondDelay_2->value();
- ui.spinBoxPickDelay->setValue(m_curWaferPickParam.iPickOrBondDelay);
- // 更新样式
- if (m_curWaferPickParam.iPickOrBondDelay == m_tempWaferPickParam.iPickOrBondDelay)
- ui.spinBoxPickDelay->setStyleSheet(""); // 恢复默认样式
- else
- ui.spinBoxPickDelay->setStyleSheet("color: red;"); // 字体颜色变红
- }
- if (m_curCalibPickParam.iId == m_curBondParam.iId) {
- m_curCalibPickParam.iPickOrBondDelay = ui.spinBoxBondDelay_2->value();
- ui.spinBoxPickDelay_2->setValue(m_curCalibPickParam.iPickOrBondDelay);
- // 更新样式
- if (m_curCalibPickParam.iPickOrBondDelay == m_tempCalibPickParam.iPickOrBondDelay)
- ui.spinBoxPickDelay_2->setStyleSheet(""); // 恢复默认样式
- else
- ui.spinBoxPickDelay_2->setStyleSheet("color: red;"); // 字体颜色变红
- }
- if (m_curCalibPlaceParam.iId == m_curBondParam.iId) {
- m_curCalibPlaceParam.iPickOrBondDelay = ui.spinBoxBondDelay_2->value();
- ui.spinBoxBondDelay->setValue(m_curCalibPlaceParam.iPickOrBondDelay);
- // 更新样式
- if (m_curCalibPlaceParam.iPickOrBondDelay == m_tempCalibPlaceParam.iPickOrBondDelay)
- ui.spinBoxBondDelay->setStyleSheet(""); // 恢复默认样式
- else
- ui.spinBoxBondDelay->setStyleSheet("color: red;"); // 字体颜色变红
- }
- }
- void BondMatrixProgramPage::onSpinBoxBondVacDelay_2EditingFinished()
- {
- m_curBondParam.iVacuumDelay = ui.spinBoxBondVacDelay_2->value();
- // 更新样式
- if (m_curBondParam.iVacuumDelay == m_tempBondParam.iVacuumDelay)
- ui.spinBoxBondVacDelay_2->setStyleSheet(""); // 恢复默认样式
- else
- ui.spinBoxBondVacDelay_2->setStyleSheet("color: red;"); // 字体颜色变红
- // 同步其他控件并处理样式
- if (m_curBondParam.iId == m_curWaferPickParam.iId) {
- m_curWaferPickParam.iVacuumDelay = ui.spinBoxBondVacDelay_2->value();
- ui.spinBoxPickVacDelay->setValue(m_curWaferPickParam.iVacuumDelay);
- // 更新样式
- if (m_curWaferPickParam.iVacuumDelay == m_tempWaferPickParam.iVacuumDelay)
- ui.spinBoxPickVacDelay->setStyleSheet(""); // 恢复默认样式
- else
- ui.spinBoxPickVacDelay->setStyleSheet("color: red;"); // 字体颜色变红
- }
- if (m_curCalibPickParam.iId == m_curBondParam.iId) {
- m_curCalibPickParam.iVacuumDelay = ui.spinBoxBondVacDelay_2->value();
- ui.spinBoxPickVacDelay_2->setValue(m_curCalibPickParam.iVacuumDelay);
- // 更新样式
- if (m_curCalibPickParam.iVacuumDelay == m_tempCalibPickParam.iVacuumDelay)
- ui.spinBoxPickVacDelay_2->setStyleSheet(""); // 恢复默认样式
- else
- ui.spinBoxPickVacDelay_2->setStyleSheet("color: red;"); // 字体颜色变红
- }
- if (m_curCalibPlaceParam.iId == m_curBondParam.iId) {
- m_curCalibPlaceParam.iVacuumDelay = ui.spinBoxBondVacDelay_2->value();
- ui.spinBoxBondVacDelay->setValue(m_curCalibPlaceParam.iVacuumDelay);
- // 更新样式
- if (m_curCalibPlaceParam.iVacuumDelay == m_tempCalibPlaceParam.iVacuumDelay)
- ui.spinBoxBondVacDelay->setStyleSheet(""); // 恢复默认样式
- else
- ui.spinBoxBondVacDelay->setStyleSheet("color: red;"); // 字体颜色变红
- }
- }
- void BondMatrixProgramPage::onSpinBoxBondBlowDelay_2EditingFinished()
- {
- m_curBondParam.iBlowDelay = ui.spinBoxBondBlowDelay_2->value();
- // 更新样式
- if (m_curBondParam.iBlowDelay == m_tempBondParam.iBlowDelay)
- ui.spinBoxBondBlowDelay_2->setStyleSheet(""); // 恢复默认样式
- else
- ui.spinBoxBondBlowDelay_2->setStyleSheet("color: red;"); // 字体颜色变红
- // 同步其他控件并处理样式
- if (m_curBondParam.iId == m_curWaferPickParam.iId) {
- m_curWaferPickParam.iBlowDelay = ui.spinBoxBondBlowDelay_2->value();
- ui.spinBoxPickBlowDelay->setValue(m_curWaferPickParam.iBlowDelay);
- // 更新样式
- if (m_curWaferPickParam.iBlowDelay == m_tempWaferPickParam.iBlowDelay)
- ui.spinBoxPickBlowDelay->setStyleSheet(""); // 恢复默认样式
- else
- ui.spinBoxPickBlowDelay->setStyleSheet("color: red;"); // 字体颜色变红
- }
- if (m_curCalibPickParam.iId == m_curBondParam.iId) {
- m_curCalibPickParam.iBlowDelay = ui.spinBoxBondBlowDelay_2->value();
- ui.spinBoxPickBlowDelay_2->setValue(m_curCalibPickParam.iBlowDelay);
- // 更新样式
- if (m_curCalibPickParam.iBlowDelay == m_tempCalibPickParam.iBlowDelay)
- ui.spinBoxPickBlowDelay_2->setStyleSheet(""); // 恢复默认样式
- else
- ui.spinBoxPickBlowDelay_2->setStyleSheet("color: red;"); // 字体颜色变红
- }
- if (m_curCalibPlaceParam.iId == m_curBondParam.iId) {
- m_curCalibPlaceParam.iBlowDelay = ui.spinBoxBondBlowDelay_2->value();
- ui.spinBoxBondBlowDelay->setValue(m_curCalibPlaceParam.iBlowDelay);
- // 更新样式
- if (m_curCalibPlaceParam.iBlowDelay == m_tempCalibPlaceParam.iBlowDelay)
- ui.spinBoxBondBlowDelay->setStyleSheet(""); // 恢复默认样式
- else
- ui.spinBoxBondBlowDelay->setStyleSheet("color: red;"); // 字体颜色变红
- }
- }
- XY_DOUBLE_STRUCT BondMatrixProgramPage::BondGetAxisPosition(std::string ModuleType, XY_DOUBLE_STRUCT& pos)
- {
- /*CAxis* _Axis;
- CAxis::AXIS_TYPE eAxisType = _Axis->GetAxisType();*/
- if (m_pProgramCViewInterface == nullptr)
- {
- XY_DOUBLE_STRUCT errorPt = pos; // 可以根据需要返回一个错误状态
- // 弹出消息框显示位置
- QString positionString = QString("Unable to retrieve axis position for module type: %1").arg(QString::fromStdString(ModuleType));
- QMessageBox::information(this, "Axis Position Error", positionString);
- return errorPt;
- }
- m_pProgramCViewInterface->GetViewMotion()->GetAxisPosition(ModuleType, "X", pos.x);
- m_pProgramCViewInterface->GetViewMotion()->GetAxisPosition(ModuleType, "Y", pos.y);
- return pos;
- }
- XY_DOUBLE_STRUCT BondMatrixProgramPage::BondMoveToXYAxisPosition(std::string ModuleType, XY_DOUBLE_STRUCT& pos)
- {
- if (m_pProgramCViewInterface == nullptr)
- {
- XY_DOUBLE_STRUCT errorPt = pos; // 可以根据需要返回一个错误状态
- // 弹出消息框显示位置
- QString positionString = QString("Unable to retrieve axis position for module type: %1").arg(QString::fromStdString(ModuleType));
- QMessageBox::information(this, "Axis Position Error", positionString);
- return errorPt;
- }
- m_pProgramCViewInterface->GetViewMotion()->ModuleMoveTo(ModuleType, "X", pos.x);
- m_pProgramCViewInterface->GetViewMotion()->ModuleMoveTo(ModuleType, "Y", pos.y);
- return pos;
- }
- void BondMatrixProgramPage::AddOutMatrixPage(int vectorIndex, PROGRAM_BOND_MATRIX_STRUCT matrixData, std::vector<PROGRAM_POINT_MATRIX_STRUCT> vecSubMatrix)
- {
- int matrixNum = m_mapSubMatrixControls.size();
- int newMatrixID = ++matrixNum;
- QVector<QObject*> vecControls;
- QWidget* outWidget = new QWidget();
- QGridLayout* outMatrixGridLayout = new QGridLayout();
- outMatrixGridLayout->setSpacing(4);
- outMatrixGridLayout->setObjectName(QString::fromUtf8("Out GridLayout"));
- outMatrixGridLayout->setContentsMargins(0, 0, 0, 0); // 设置布局的边距为0
- QGridLayout* boxGridLayout = new QGridLayout();
- boxGridLayout->setSpacing(4);
- boxGridLayout->setObjectName(QString::fromUtf8("Box GridLayout"));
- boxGridLayout->setContentsMargins(0, 0, 0, 0); // 设置布局的边距为0
- QHBoxLayout* buttonLayout = new QHBoxLayout();
- QSpacerItem* item = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
- buttonLayout->addSpacerItem(item);
- QGroupBox* groupBox = new QGroupBox(outWidget);
- groupBox->setLayout(boxGridLayout);
- QGridLayout* matrixGridLayout = new QGridLayout();
- matrixGridLayout->setSpacing(4);
- matrixGridLayout->setObjectName(QString::fromUtf8("matrixGridLayout"));
- matrixGridLayout->setContentsMargins(0, 0, 0, 0); // 设置布局的边距为0
- // Add matrix title
- QLabel* labelTitle = new QLabel(outWidget);
- labelTitle->setObjectName(QString::fromUtf8("labelTitle"));
- labelTitle->setText(tr("Bond Matrix ") + QString::number(vectorIndex+1));
- labelTitle->setStyleSheet("color: #6A78FF;height: 30px");
- matrixGridLayout->addWidget(labelTitle, 0, 0, 1, 1);
- vecControls.push_back(labelTitle);
- // Add "Add Sub Matrix" button
- QPushButton* pushButtonAdd = new QPushButton(outWidget);
- pushButtonAdd->setObjectName(QString::fromUtf8("button Add"));
- pushButtonAdd->setText(tr("Add sub Matrix"));
- matrixGridLayout->addWidget(pushButtonAdd, 0, 2, 1, 3);
- pushButtonAdd->setProperty("type", "default");
- connect(pushButtonAdd, &QPushButton::clicked, this, [=]() {
- int newSubMatrixIndex = m_vecSubMatrixs.size();
- PROGRAM_POINT_MATRIX_STRUCT subMatrix;
- std::sort(m_vecSubMatrixs.begin(), m_vecSubMatrixs.end(),
- [](const PROGRAM_POINT_MATRIX_STRUCT& a, const PROGRAM_POINT_MATRIX_STRUCT& b) {
- return a.MatrixId < b.MatrixId;
- });
- int newSubMatrixID = 0;
- UINT maxID = 0;
- // 查找最大 MatrixId
- for (PROGRAM_POINT_MATRIX_STRUCT& subMatrix : m_vecSubMatrixs)
- {
- if (subMatrix.MatrixId > maxID)
- {
- maxID = subMatrix.MatrixId;
- }
- }
- newSubMatrixID = ++maxID;
- while (std::any_of(m_vecSubMatrixs.begin(), m_vecSubMatrixs.end(),
- [newSubMatrixID](const PROGRAM_POINT_MATRIX_STRUCT& subMatrix) {
- return subMatrix.MatrixId == newSubMatrixID;
- }))
- {
- newSubMatrixID++; // 如果生成的 ID 已经存在,递增直到找到唯一的 ID
- }
- subMatrix.MatrixId = newSubMatrixID;
- subMatrix.strModuleName = "BondHead";
- subMatrix.iModuleId = MODULE_LIST::BondHead;
- subMatrix.MatrixRow = 0;
- subMatrix.MatrixCol = 0;
- m_vecSubMatrixs.push_back(subMatrix);
- // Add the submatrix to the bond matrix's VecPointMatrixId
- //找大矩阵ID/Index
- auto currentIt = m_mapOutWidgetIndex.find(outWidget);
- int bondMatrixId = currentIt.value(); //迭代器 erase后currentIt被删除了
- //m_vectBondMatrixs[index].VecPointMatrixId.push_back(newSubMatrixID);
- // 遍历 m_vectBondMatrixs 找到对应的矩阵
- for (size_t i = 0; i < m_vectBondMatrixs.size(); ++i) {
- if (m_vectBondMatrixs[i].BondMatrixId == bondMatrixId) {
- // 找到对应的矩阵,添加新的子矩阵 ID
- m_vectBondMatrixs[i].VecPointMatrixId.push_back(newSubMatrixID);
- break; // 找到后退出循环
- }
- }
- AddMatrixPage(bondMatrixId, newSubMatrixIndex, subMatrix, outMatrixGridLayout);
- });
- // Add Delete Out Matrix button
- QPushButton* pushButtonDelete = new QPushButton(outWidget);
- pushButtonDelete->setObjectName(QString::fromUtf8("button delete"));
- pushButtonDelete->setText(tr("Delete"));
- matrixGridLayout->addWidget(pushButtonDelete, 0, 1, 1, 1);
- connect(pushButtonDelete, &QPushButton::clicked, this, [=]() {
- //处理index
- auto currentIt = m_mapOutWidgetIndex.find(outWidget);
- int index = currentIt.value(); //迭代器 erase后currentIt被删除了
- m_mapOutWidgetIndex.erase(currentIt);
- delete outWidget;
- ui.comboBoxCurrentMatrix->clear();
- for (int i = 0; i < m_vectBondMatrixs.size(); i++)
- {
- int bondMatrixId = m_vectBondMatrixs[i].BondMatrixId;
- // 显示 矩阵编号
- QString itemText = QString::number(bondMatrixId);
- if (bondMatrixId == index) {
- //删除缓存数据
- m_vectBondMatrixs.erase(m_vectBondMatrixs.begin() + i);
- continue;
- }
- // 将 矩阵编号 添加到下拉框
- ui.comboBoxCurrentMatrix->addItem(itemText, bondMatrixId);
- }
- if (!m_vectBondMatrixs.empty()) {
- ShowCurrentMatrix(m_vectBondMatrixs[0].BondMatrixId);
- }
- });
- // Add Row and Column controls
- QLabel* labelRow = new QLabel(outWidget);
- labelRow->setObjectName(QString::fromUtf8("labelRow"));
- labelRow->setText(tr("Row & Cow"));
- matrixGridLayout->addWidget(labelRow, 2, 0, 1, 1);
- vecControls.push_back(labelRow);
- SpinBox* spinBoxRow = new SpinBox(outWidget);
- spinBoxRow->setObjectName(QString::fromUtf8("spinBoxRow"));
- spinBoxRow->setFixedWidth(95); // Set fixed width to 95
- matrixGridLayout->addWidget(spinBoxRow, 2, 1, 1, 1);
- vecControls.push_back(spinBoxRow);
- SpinBox* spinBoxCol = new SpinBox(outWidget);
- spinBoxCol->setObjectName(QString::fromUtf8("spinBoxCol"));
- spinBoxCol->setFixedWidth(95); // Set fixed width to 95
- matrixGridLayout->addWidget(spinBoxCol, 2, 2, 1, 1);
- vecControls.push_back(spinBoxCol);
- // Add Left Top Position controls
- QLabel* labelLeftTop = new QLabel(outWidget);
- labelLeftTop->setObjectName(QString::fromUtf8("labelLeftTop"));
- labelLeftTop->setText(tr("Left Top Pos "));
- matrixGridLayout->addWidget(labelLeftTop, 4, 0, 1, 1);
- vecControls.push_back(labelLeftTop);
- DoubleSpinBox* doubleSpinBoxLeftTopX = new DoubleSpinBox(outWidget);
- doubleSpinBoxLeftTopX->setObjectName(QString::fromUtf8("doubleSpinBoxLeftTopX"));
- doubleSpinBoxLeftTopX->setFixedWidth(95); // Set fixed width to 95
- matrixGridLayout->addWidget(doubleSpinBoxLeftTopX, 4, 1, 1, 1);
- vecControls.push_back(doubleSpinBoxLeftTopX);
- DoubleSpinBox* doubleSpinBoxLeftTopY = new DoubleSpinBox(outWidget);
- doubleSpinBoxLeftTopY->setObjectName(QString::fromUtf8("doubleSpinBoxLeftTopY"));
- doubleSpinBoxLeftTopY->setFixedWidth(95); // Set fixed width to 95
- matrixGridLayout->addWidget(doubleSpinBoxLeftTopY, 4, 2, 1, 1);
- vecControls.push_back(doubleSpinBoxLeftTopY);
- // Add GP button for Left Top
- QPushButton* buttonLeftTop = new QPushButton("GP", this);
- buttonLeftTop->setFixedWidth(31); // Set the same width for the button
- matrixGridLayout->addWidget(buttonLeftTop, 4, 3, 1, 1); // Position the button next to LeftTopPos
- connect(buttonLeftTop, &QPushButton::clicked, this, [=]() {
- XY_DOUBLE_STRUCT position = BondGetAxisPosition("BondHead", m_vectBondMatrixs[vectorIndex].LeftTopPoint);
- doubleSpinBoxLeftTopX->setValue(position.x);
- doubleSpinBoxLeftTopY->setValue(position.y);
- });
- QPushButton* buttonMoveToLeftTop = new QPushButton("MT", this);
- buttonMoveToLeftTop->setFixedWidth(31); // Set the same width for the button
- matrixGridLayout->addWidget(buttonMoveToLeftTop, 4, 4, 1, 1); // Position the button next to LeftTopPos
- connect(buttonMoveToLeftTop, &QPushButton::clicked, this, [=]() {
- XY_DOUBLE_STRUCT position = BondMoveToXYAxisPosition("BondHead", m_vectBondMatrixs[vectorIndex].LeftTopPoint);
- });
- // Add Right Top Position controls
- QLabel* labelRightTopPos = new QLabel(outWidget);
- labelRightTopPos->setObjectName(QString::fromUtf8("labelRightTopPos"));
- labelRightTopPos->setText(tr("Right Top Pos "));
- matrixGridLayout->addWidget(labelRightTopPos, 5, 0, 1, 1);
- vecControls.push_back(labelRightTopPos);
- DoubleSpinBox* doubleSpinBoxRightTopX = new DoubleSpinBox(outWidget);
- doubleSpinBoxRightTopX->setObjectName(QString::fromUtf8("doubleSpinBoxRightTopX"));
- doubleSpinBoxRightTopX->setFixedWidth(95); // Set fixed width to 95
- matrixGridLayout->addWidget(doubleSpinBoxRightTopX, 5, 1, 1, 1);
- vecControls.push_back(doubleSpinBoxRightTopX);
- DoubleSpinBox* doubleSpinBoxRightTopY = new DoubleSpinBox(outWidget);
- doubleSpinBoxRightTopY->setObjectName(QString::fromUtf8("doubleSpinBoxRightTopY"));
- doubleSpinBoxRightTopY->setFixedWidth(95); // Set fixed width to 95
- matrixGridLayout->addWidget(doubleSpinBoxRightTopY, 5, 2, 1, 1);
- vecControls.push_back(doubleSpinBoxRightTopY);
- QPushButton* buttonRightTop = new QPushButton("GP", this);
- buttonRightTop->setFixedWidth(31); // Set the same width for the button
- matrixGridLayout->addWidget(buttonRightTop, 5, 3, 1, 1); // Position the button next to RightTopPos
- connect(buttonRightTop, &QPushButton::clicked, this, [=]() {
- XY_DOUBLE_STRUCT position = BondGetAxisPosition("BondHead", m_vectBondMatrixs[vectorIndex].RightTopPoint);
- doubleSpinBoxRightTopX->setValue(position.x);
- doubleSpinBoxRightTopY->setValue(position.y);
- });
- QPushButton* buttonMoveToRightTop = new QPushButton("MT", this);
- buttonMoveToRightTop->setFixedWidth(31);
- matrixGridLayout->addWidget(buttonMoveToRightTop, 5, 4, 1, 1);
- connect(buttonMoveToRightTop, &QPushButton::clicked, this, [=]() {
- XY_DOUBLE_STRUCT position = BondMoveToXYAxisPosition("BondHead", m_vectBondMatrixs[vectorIndex].RightTopPoint);
- });
- // Add Right Bottom Position controls
- QLabel* labelRightButtomPos = new QLabel(outWidget);
- labelRightButtomPos->setObjectName(QString::fromUtf8("labelRightButtomPos"));
- labelRightButtomPos->setText(tr("Right Buttom pos"));
- matrixGridLayout->addWidget(labelRightButtomPos, 6, 0, 1, 1);
- vecControls.push_back(labelRightButtomPos);
- DoubleSpinBox* doubleSpinBoxRightButtomX = new DoubleSpinBox(outWidget);
- doubleSpinBoxRightButtomX->setObjectName(QString::fromUtf8("doubleSpinBoxRightButtomX"));
- doubleSpinBoxRightButtomX->setFixedWidth(95); // Set fixed width to 95
- matrixGridLayout->addWidget(doubleSpinBoxRightButtomX, 6, 1, 1, 1);
- vecControls.push_back(doubleSpinBoxRightButtomX);
- DoubleSpinBox* doubleSpinBoxRightButtomY = new DoubleSpinBox(outWidget);
- doubleSpinBoxRightButtomY->setObjectName(QString::fromUtf8("doubleSpinBoxRightButtomY"));
- doubleSpinBoxRightButtomY->setFixedWidth(95); // Set fixed width to 95
- matrixGridLayout->addWidget(doubleSpinBoxRightButtomY, 6, 2, 1, 1);
- vecControls.push_back(doubleSpinBoxRightTopX);
- QPushButton* buttonRightButtom = new QPushButton("GP", this);
- buttonRightButtom->setFixedWidth(31); // Set the same width for the button
- matrixGridLayout->addWidget(buttonRightButtom, 6, 3, 1, 1); // Position the button next to RightBottomPos
- connect(buttonRightButtom, &QPushButton::clicked, this, [=]() {
- XY_DOUBLE_STRUCT position = BondGetAxisPosition("BondHead", m_vectBondMatrixs[vectorIndex].RightBottomPoint);
- doubleSpinBoxRightButtomX->setValue(position.x);
- doubleSpinBoxRightButtomY->setValue(position.y);
- });
- QPushButton* buttonMoveToRightButtom = new QPushButton("MT", this);
- buttonMoveToRightButtom->setFixedWidth(31);
- matrixGridLayout->addWidget(buttonMoveToRightButtom, 6, 4, 1, 1);
- connect(buttonMoveToRightButtom, &QPushButton::clicked, this, [=]() {
- XY_DOUBLE_STRUCT position = BondMoveToXYAxisPosition("BondHead", m_vectBondMatrixs[vectorIndex].RightBottomPoint);
- });
- // Add No Bond Points line edit
- QLabel* labelNoBondPts = new QLabel(outWidget);
- labelNoBondPts->setObjectName(QString::fromUtf8("labelNoBondPts"));
- labelNoBondPts->setText(tr("No Bond Points"));
- matrixGridLayout->addWidget(labelNoBondPts, 7, 0, 1, 1);
- vecControls.push_back(labelNoBondPts);
- QLineEdit* lineEditNoBondPts = new QLineEdit(outWidget);
- lineEditNoBondPts->setObjectName(QString::fromUtf8("lineEditNoBondPts"));
- matrixGridLayout->addWidget(lineEditNoBondPts, 7, 1, 1, 4);
- vecControls.push_back(lineEditNoBondPts);
- lineEditNoBondPts->setReadOnly(true);
- lineEditNoBondPts->setCursor(Qt::PointingHandCursor);
- lineEditNoBondPts->setProperty("vectorIndex", vectorIndex); // 存储索引
- lineEditNoBondPts->setProperty("parentMatrixIndex", -1); // 设置父矩阵的索引
- lineEditNoBondPts->installEventFilter(this);
- QStringList ptList;
- for (const auto& pt : m_vectBondMatrixs[vectorIndex].VecNoBondPt)
- ptList << QString("(%1,%2)").arg(pt.x).arg(pt.y);
- lineEditNoBondPts->setText(ptList.join(" "));
- // Paragram line edit
- QLabel* labelParagram = new QLabel(outWidget);
- labelParagram->setObjectName(QString::fromUtf8("labelParagram"));
- labelParagram->setText(tr("ParagramSet"));
- matrixGridLayout->addWidget(labelParagram, 8, 0, 1, 1);
- vecControls.push_back(labelParagram);
- QComboBox* comboBoxParagramSet = new QComboBox(outWidget);
- comboBoxParagramSet->setObjectName(QString::fromUtf8("comboBoxParagramSet"));
- m_mapParagramSetComboBox.insert(comboBoxParagramSet, matrixData.BondMatrixId);
- // 添加选项到下拉框并关联 iInfoId
- for (const auto& bondMatrix : m_vecBondInfoData) {
- // 将 iInfoId 作为显示项添加到下拉框
- QString itemText = QString::number(bondMatrix.iInfoId); // 显示编号 iInfoId
- // 添加项并使用 setData 存储 iInfoId 作为附加数据
- comboBoxParagramSet->addItem(itemText, bondMatrix.iInfoId);
- }
- comboBoxParagramSet->setCurrentIndex(comboBoxParagramSet->findData(matrixData.BondInfoId)); // 设置默认项
- ui.comboBoxCurrentPara->setCurrentIndex(ui.comboBoxCurrentPara->findData(matrixData.BondInfoId)); // 设置默认项
- // 将下拉框添加到布局中
- matrixGridLayout->addWidget(comboBoxParagramSet, 8, 1, 1, 1);
- // 将控件保存到 vecControls 中
- vecControls.push_back(comboBoxParagramSet);
- // 连接 QComboBox 的信号和槽
- connect(comboBoxParagramSet, SIGNAL(currentIndexChanged(int)), this, SLOT(onComboBoxIndexChangedForMatrixParam(int)));
- comboBoxParagramSet->installEventFilter(this);
- //QPushButton* buttonParagram = new QPushButton("ShowParagram", this);
- ////buttonParagram->setFixedWidth(31); // Set the same width for the button
- //matrixGridLayout->addWidget(buttonParagram, 8, 2, 1, 2); // Position the button next to RightBottomPos
- //connect(buttonParagram, &QPushButton::clicked, this, [=]() {
- // UpdateShowBondInfoData(m_vectBondMatrixs[vectorIndex].BondInfoId);
- // });
- QFrame* line = new QFrame(outWidget);
- line->setFrameShape(QFrame::NoFrame); // 移除默认框架
- line->setFixedHeight(2); // 设置固定高度
- line->setStyleSheet("background-color: #C7CAEB;");
- boxGridLayout->addLayout(matrixGridLayout, 2, 0);
- boxGridLayout->addWidget(line);
- //outMatrixGridLayout->addLayout(buttonLayout, 1, 0);
- outMatrixGridLayout->addWidget(groupBox);
- outWidget->setLayout(outMatrixGridLayout);
-
- ui.verticalLayout_3->addWidget(outWidget);
- ui.verticalLayout_3->setContentsMargins(0, 0, 0, 0); // Adjust margins if necessary
- ui.verticalLayout_3->setAlignment(Qt::AlignTop | Qt::AlignLeft); // Align the layout to the top-left
- m_mapOutWidgetIndex.insert(outWidget, matrixData.BondMatrixId);
- // Add Sub Matrices
- for (int j = 0; j < matrixData.VecPointMatrixId.size(); j++)
- {
- for (int i = 0; i < m_vecSubMatrixs.size(); i++)
- {
- if (matrixData.VecPointMatrixId[j] == m_vecSubMatrixs[i].MatrixId)
- {
- AddMatrixPage(j, i, m_vecSubMatrixs[i], outMatrixGridLayout);
- }
- }
- }
-
- // Add all controls and finalize layout
- /*outWidget->setLayout(outMatrixGridLayout);
- ui.scrollArea_2->setLayout(outMatrixGridLayout);*/
- spinBoxRow->setValue(matrixData.BondMatrixRow);
- spinBoxCol->setValue(matrixData.BondMatrixCol);
- doubleSpinBoxLeftTopX->setValue(matrixData.LeftTopPoint.x);
- doubleSpinBoxLeftTopY->setValue(matrixData.LeftTopPoint.y);
- doubleSpinBoxRightTopX->setValue(matrixData.RightTopPoint.x);
- doubleSpinBoxRightTopY->setValue(matrixData.RightTopPoint.y);
- doubleSpinBoxRightButtomX->setValue(matrixData.RightBottomPoint.x);
- doubleSpinBoxRightButtomY->setValue(matrixData.RightBottomPoint.y);
- connect(spinBoxRow, &SpinBox::editDone, this, [=]() {
- m_vectBondMatrixs[vectorIndex].BondMatrixRow = spinBoxRow->value();
- });
- connect(spinBoxCol, &SpinBox::editDone, this, [=]() {
- m_vectBondMatrixs[vectorIndex].BondMatrixCol = spinBoxCol->value();
- });
- connect(doubleSpinBoxLeftTopX, &DoubleSpinBox::editDone, this, [=]() {
- m_vectBondMatrixs[vectorIndex].LeftTopPoint.x = doubleSpinBoxLeftTopX->value();
- });
- connect(doubleSpinBoxLeftTopY, &DoubleSpinBox::editDone, this, [=]() {
- m_vectBondMatrixs[vectorIndex].LeftTopPoint.y = doubleSpinBoxLeftTopY->value();
- });
- connect(doubleSpinBoxRightTopX, &DoubleSpinBox::editDone, this, [=]() {
- m_vectBondMatrixs[vectorIndex].RightTopPoint.x = doubleSpinBoxRightTopX->value();
- });
- connect(doubleSpinBoxRightTopY, &DoubleSpinBox::editDone, this, [=]() {
- m_vectBondMatrixs[vectorIndex].RightTopPoint.y = doubleSpinBoxRightTopY->value();
- });
- connect(doubleSpinBoxRightButtomX, &DoubleSpinBox::editDone, this, [=]() {
- m_vectBondMatrixs[vectorIndex].RightBottomPoint.x = doubleSpinBoxRightButtomX->value();
- });
- connect(doubleSpinBoxRightButtomY, &DoubleSpinBox::editDone, this, [=]() {
- m_vectBondMatrixs[vectorIndex].RightBottomPoint.y = doubleSpinBoxRightButtomY->value();
- });
- connect(lineEditNoBondPts, &QLineEdit::textChanged, this, [=]() {
- });
- }
- void BondMatrixProgramPage::onComboBoxPopupBondInfo(QComboBox* comboBox) {
- if (!comboBox) {
- return;
- }
- int currentIndex = comboBox->currentIndex(); // 获取当前选中的索引
- QVariant currentData = comboBox->currentData(); // 获取当前选中的附加数据(例如 iInfoId)
- // 清空下拉框中的所有项
- comboBox->clear();
- // 重新填充下拉框选项,并更新 QMap 中的绑定关系
- for (const auto& bondMatrix : m_vecBondInfoData) {
- // 显示编号 iInfoId
- QString itemText = QString::number(bondMatrix.iInfoId);
- // 将 iInfoId 添加到下拉框
- comboBox->addItem(itemText, bondMatrix.iInfoId);
- }
- // 恢复原来的选中项
- if (currentData.isValid()) {
- // 通过 currentData 恢复选中项
- int index = comboBox->findData(currentData);
- if (index >= 0) {
- comboBox->setCurrentIndex(index); // 设置当前选中项
- }
- }
- //UINT iInfoId = currentData.toUInt(); // 将 currentData 转换为 UINT
- //UpdateShowBondInfoData(iInfoId);
- }
- void BondMatrixProgramPage::ShowCurrentMatrix(int bondMatrixId)
- {
- // 遍历 comboBox 中的项,找到与 bondMatrixId 匹配的项的索引
- int index = -1;
- for (int i = 0; i < ui.comboBoxCurrentMatrix->count(); ++i) {
- if (ui.comboBoxCurrentMatrix->itemData(i).toInt() == bondMatrixId) {
- index = i; // 找到对应的索引
- break;
- }
- }
- // 如果找到了对应的索引,则设置为当前选中的项
- if (index != -1) {
- ui.comboBoxCurrentMatrix->setCurrentIndex(index);
- }
- // 清空布局内容并隐藏之前的控件
- QLayoutItem* item;
- while ((item = ui.verticalLayout_3->takeAt(0)) != nullptr) {
- QWidget* widget = item->widget();
- if (widget) {
- widget->hide(); // 隐藏控件,而不是删除它
- }
- delete item; // 删除布局项
- }
- // 查找对应矩阵的控件
- QWidget* outWidget = nullptr;
- // 遍历 m_mapOutWidgetIndex 查找对应的 QWidget
- for (auto it = m_mapOutWidgetIndex.begin(); it != m_mapOutWidgetIndex.end(); ++it) {
- if (it.value() == bondMatrixId) { // 找到对应的矩阵索引
- outWidget = it.key(); // 获取对应的 QWidget
- break;
- }
- }
- // 找到并添加 outWidget
- if (outWidget && ui.verticalLayout_3->indexOf(outWidget) == -1) {
- ui.verticalLayout_3->addWidget(outWidget);
- outWidget->show(); // 显示控件
- }
- // 最后加 back 一个 vSpacer
- ui.verticalLayout_3->addItem(new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding));
- int selectedBondInfoId = -1;
- for (int i = 0; i < m_vectBondMatrixs.size(); ++i) {
- if (m_vectBondMatrixs[i].BondMatrixId == bondMatrixId) {
- selectedBondInfoId = m_vectBondMatrixs[i].BondInfoId;
- break;
- }
- }
- UpdateShowBondInfoData(selectedBondInfoId);
- }
- void BondMatrixProgramPage::onComboBoxCurrentMatrixChanged(int index)
- {
- // 判断 index 是否有效
- if (index < 0 || index >= ui.comboBoxCurrentMatrix->count())
- return;
- // 获取当前选项的 bondMatrixId
- int bondMatrixId = ui.comboBoxCurrentMatrix->itemData(index).toInt();
- ShowCurrentMatrix(bondMatrixId); // 调用 ShowCurrentMatrix 更新显示
- }
- //void BondMatrixProgramPage::ShowCurrentMatrix(int bondMatrixId)
- //{
- // // 遍历 comboBox 中的项,找到与 bondMatrixId 匹配的项的索引
- // int index = -1;
- // for (int i = 0; i < ui.comboBoxCurrentMatrix->count(); ++i) {
- // if (ui.comboBoxCurrentMatrix->itemData(i).toInt() == bondMatrixId) {
- // index = i; // 找到对应的索引
- // break;
- // }
- // }
- //
- // // 如果找到了对应的索引,则设置为当前选中的项
- // if (index != -1) {
- // ui.comboBoxCurrentMatrix->setCurrentIndex(index);
- // }
- //
- // // 清光布局内容
- // QLayoutItem* item;
- // while ((item = ui.verticalLayout_3->takeAt(0)) != nullptr) {
- // QWidget* widget = item->widget();
- // if (widget) {
- // widget->setParent(nullptr);
- // }
- // delete item;
- // }
- //
- // // 查找对应矩阵的控件
- // QWidget* outWidget = nullptr;
- //
- // // 遍历 m_mapOutWidgetIndex 查找对应的 QWidget
- // for (auto it = m_mapOutWidgetIndex.begin(); it != m_mapOutWidgetIndex.end(); ++it) {
- // if (it.value() == bondMatrixId) { // 找到对应的矩阵索引
- // outWidget = it.key(); // 获取对应的 QWidget
- // break;
- // }
- // }
- //
- // // 找到并添加 outWidget
- // if (outWidget && ui.verticalLayout_3->indexOf(outWidget) == -1) {
- // ui.verticalLayout_3->addWidget(outWidget);
- // }
- //
- // // 最后加 back 一个 vSpacer
- // ui.verticalLayout_3->addItem(new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding));
- //}
- //
- //void BondMatrixProgramPage::onComboBoxCurrentMatrixChanged(int index)
- //{
- // // 判断index有效
- // if (index < 0 || index >= ui.comboBoxCurrentMatrix->count())
- // return;
- //
- // // 获取当前选项的 bondMatrixId
- // int bondMatrixId = ui.comboBoxCurrentMatrix->itemData(index).toInt();
- // ShowCurrentMatrix(bondMatrixId);
- //}
- void BondMatrixProgramPage::onComboBoxIndexChangedForMatrixParam(int index) {
- // 获取当前选中的 QComboBox
- QComboBox* comboBox = qobject_cast<QComboBox*>(sender());
- if (!comboBox) {
- return;
- }
- // 获取当前选中的 BondInfoId
- UINT selectedBondInfoId = comboBox->currentData().toUInt();
- // 获取当前 QComboBox 对应的 matrixId
- int matrixId = m_mapParagramSetComboBox.value(comboBox, -1); // 从 QMap 中获取 vectorIndex
- if (matrixId > 0) {
- // 更新 m_vectBondMatrixs[vectorIndex].BondInfoId
- for (int i = 0; i < m_vectBondMatrixs.size(); i++) {
- if (m_vectBondMatrixs[i].BondMatrixId == matrixId) {
- m_vectBondMatrixs[i].BondInfoId = selectedBondInfoId;
- break;
- }
- }
- }
- // 调用 UpdateShowBondInfoData 更新数据
- UpdateShowBondInfoData(selectedBondInfoId);
- }
- void BondMatrixProgramPage::onComboBoxIndexChangedForParam(int index) {
- // 获取当前选中的 QComboBox
- QComboBox* comboBox = qobject_cast<QComboBox*>(sender());
- if (!comboBox) {
- return;
- }
- // 获取当前选中的 BondInfoId
- UINT selectedBondInfoId = comboBox->currentData().toUInt();
- // 调用 UpdateShowBondInfoData 更新数据
- UpdateShowBondInfoData(selectedBondInfoId);
- }
- void BondMatrixProgramPage::AddMatrixPage(int vectorIndex, int subVectorIndex, PROGRAM_POINT_MATRIX_STRUCT subMatrix, QGridLayout* layout)
- {
- QVector<QObject*> vecControls;
- QWidget* subWidget = new QWidget();
- QGridLayout* subGridLayout = new QGridLayout(subWidget);
- subGridLayout->setSpacing(4);
- subGridLayout->setObjectName(QString::fromUtf8("subGridLayout"));
- //groupBox->setLayout(subGridLayout);
- subGridLayout->setContentsMargins(0, 0, 0, 0); // 设置布局的边距为0
- subGridLayout->setAlignment(Qt::AlignCenter);
- QLabel* labelTitle = new QLabel(subWidget);
- labelTitle->setObjectName(QString::fromUtf8("labelTitle"));
- labelTitle->setText(tr("Sub Matrix ") + QString::number(subVectorIndex));
- labelTitle->setStyleSheet("color: #808BFF;height: 30px");
- subGridLayout->addWidget(labelTitle, 0, 1, 1, 1);
- vecControls.push_back(labelTitle);
- QPushButton* pushButtonDelete = new QPushButton(subWidget);
- pushButtonDelete->setObjectName(QString::fromUtf8("button delete"));
- pushButtonDelete->setText(tr("Delete"));
- subGridLayout->addWidget(pushButtonDelete, 0, 3, 1, 2);
- connect(pushButtonDelete, &QPushButton::clicked, this, [=]() {
- //处理index
- auto currentIt = m_mapSubWidgetIndex.find(subWidget);
- int index = currentIt.value(); //迭代器 erase后currentIt被删除了
- m_mapSubWidgetIndex.erase(currentIt);
- for (auto it = m_mapSubWidgetIndex.begin(); it != m_mapSubWidgetIndex.end(); ++it)
- {
- if (it.value() > index)
- {
- //value() 返回的是副本不是引用
- int newIndex = it.value() - 1;
- m_mapSubWidgetIndex.insert(it.key(), newIndex);
- }
- }
- // 子矩阵ID
- int subMatrixId = m_vecSubMatrixs[index].MatrixId;
- //删除缓存
- m_vecSubMatrixs.erase(m_vecSubMatrixs.begin() + index);
- //删除大矩阵子ID数据(遍历删除)
- for (PROGRAM_BOND_MATRIX_STRUCT& matrix : m_vectBondMatrixs)
- {
- auto it = std::find(matrix.VecPointMatrixId.begin(), matrix.VecPointMatrixId.end(), subMatrixId);
- if (it != matrix.VecPointMatrixId.end())
- {
- matrix.VecPointMatrixId.erase(it);
- }
- }
- delete subWidget;
- });
- QLabel* labelRow = new QLabel(subWidget);
- labelRow->setObjectName(QString::fromUtf8("labelRow"));
- labelRow->setText(tr("Row & Cow"));
- subGridLayout->addWidget(labelRow, 2, 0, 1, 1);
- vecControls.push_back(labelRow);
- SpinBox* spinBoxRow = new SpinBox(subWidget);
- spinBoxRow->setObjectName(QString::fromUtf8("spinBoxRow"));
- subGridLayout->addWidget(spinBoxRow, 2, 1, 1, 1);
- vecControls.push_back(spinBoxRow);
- /*QLabel* labelCol = new QLabel(subWidget);
- labelCol->setObjectName(QString::fromUtf8("labelCol"));
- labelCol->setText(tr("Cow "));
- subGridLayout->addWidget(labelCol, 3, 0, 1, 1);
- vecControls.push_back(labelCol);*/
- SpinBox* spinBoxCol = new SpinBox(subWidget);
- spinBoxCol->setObjectName(QString::fromUtf8("spinBoxCol"));
- subGridLayout->addWidget(spinBoxCol, 2, 2, 1, 1);
- vecControls.push_back(spinBoxCol);
- QLabel* labelLeftTop = new QLabel(subWidget);
- labelLeftTop->setObjectName(QString::fromUtf8("labelLeftTop"));
- labelLeftTop->setText(tr("Left Top Pos "));
- subGridLayout->addWidget(labelLeftTop, 4, 0, 1, 1);
- vecControls.push_back(labelLeftTop);
- DoubleSpinBox* doubleSpinBoxLeftTopX = new DoubleSpinBox(subWidget);
- doubleSpinBoxLeftTopX->setObjectName(QString::fromUtf8("doubleSpinBoxLeftTopX"));
- doubleSpinBoxLeftTopX->setFixedWidth(95); // Set fixed width to 95
- doubleSpinBoxLeftTopX->setFixedWidth(95); // Set fixed width to 95
- subGridLayout->addWidget(doubleSpinBoxLeftTopX, 4, 1, 1, 1);
- vecControls.push_back(doubleSpinBoxLeftTopX);
- DoubleSpinBox* doubleSpinBoxLeftTopY = new DoubleSpinBox(subWidget);
- doubleSpinBoxLeftTopY->setObjectName(QString::fromUtf8("doubleSpinBoxLeftTopY"));
- doubleSpinBoxLeftTopY->setFixedWidth(95); // Set fixed width to 95
- subGridLayout->addWidget(doubleSpinBoxLeftTopY, 4, 2, 1, 1);
- vecControls.push_back(doubleSpinBoxLeftTopY);
- QLabel* labelRightTopPos = new QLabel(subWidget);
- labelRightTopPos->setObjectName(QString::fromUtf8("labelRightTopPos"));
- labelRightTopPos->setText(tr("Right Top Pos "));
- subGridLayout->addWidget(labelRightTopPos, 5, 0, 1, 1);
- vecControls.push_back(labelRightTopPos);
- DoubleSpinBox* doubleSpinBoxRightTopX = new DoubleSpinBox(subWidget);
- doubleSpinBoxRightTopX->setObjectName(QString::fromUtf8("doubleSpinBoxRightTopX"));
- doubleSpinBoxRightTopX->setFixedWidth(95); // Set fixed width to 95
- subGridLayout->addWidget(doubleSpinBoxRightTopX, 5, 1, 1, 1);
- vecControls.push_back(doubleSpinBoxRightTopX);
- DoubleSpinBox* doubleSpinBoxRightTopY = new DoubleSpinBox(subWidget);
- doubleSpinBoxRightTopY->setObjectName(QString::fromUtf8("doubleSpinBoxRightTopY"));
- doubleSpinBoxRightTopY->setFixedWidth(95); // Set fixed width to 95
- subGridLayout->addWidget(doubleSpinBoxRightTopY, 5, 2, 1, 1);
- vecControls.push_back(doubleSpinBoxRightTopY);
- QLabel* labelRightButtomPos = new QLabel(subWidget);
- labelRightButtomPos->setObjectName(QString::fromUtf8("labelRightButtomPos"));
- labelRightButtomPos->setText(tr("Right Buttom pos"));
- subGridLayout->addWidget(labelRightButtomPos, 6, 0, 1, 1);
- vecControls.push_back(labelRightButtomPos);
- DoubleSpinBox* doubleSpinBoxRightButtomX = new DoubleSpinBox(subWidget);
- doubleSpinBoxRightButtomX->setObjectName(QString::fromUtf8("doubleSpinBoxRightButtomX"));
- doubleSpinBoxRightButtomX->setFixedWidth(95); // Set fixed width to 95
- subGridLayout->addWidget(doubleSpinBoxRightButtomX, 6, 1, 1, 1);
- vecControls.push_back(doubleSpinBoxRightButtomX);
- DoubleSpinBox* doubleSpinBoxRightButtomY = new DoubleSpinBox(subWidget);
- doubleSpinBoxRightButtomY->setObjectName(QString::fromUtf8("doubleSpinBoxRightButtomY"));
- doubleSpinBoxRightButtomY->setFixedWidth(95); // Set fixed width to 95
- subGridLayout->addWidget(doubleSpinBoxRightButtomY, 6, 2, 1, 1);
- vecControls.push_back(doubleSpinBoxRightTopX);
- QLabel* labelNoBondPts = new QLabel(subWidget);
- labelNoBondPts->setObjectName(QString::fromUtf8("labelNoBondPts"));
- labelNoBondPts->setText(tr("No Bond Points"));
- subGridLayout->addWidget(labelNoBondPts, 7, 0, 1, 1);
- vecControls.push_back(labelNoBondPts);
- QLineEdit* lineEditNoBondPts = new QLineEdit(subWidget);
- lineEditNoBondPts->setObjectName(QString::fromUtf8("lineEditNoBondPts"));
- lineEditNoBondPts->setReadOnly(true);
- lineEditNoBondPts->setCursor(Qt::PointingHandCursor);
- lineEditNoBondPts->setProperty("vectorIndex", subVectorIndex); // 存储索引
- lineEditNoBondPts->setProperty("parentMatrixIndex", vectorIndex); // 设置父矩阵的索引
- lineEditNoBondPts->installEventFilter(this);
- QStringList ptList;
- for (const auto& pt : m_vecSubMatrixs[subVectorIndex].VecNoBondPt)
- ptList << QString("(%1,%2)").arg(pt.x).arg(pt.y);
- lineEditNoBondPts->setText(ptList.join(" "));
- subGridLayout->addWidget(lineEditNoBondPts, 7, 1, 1, 3);
- vecControls.push_back(lineEditNoBondPts);
- // Left Top Position X and Y
- QPushButton* buttonLeftTop = new QPushButton("GP", subWidget);
- buttonLeftTop->setFixedWidth(31); // 设置固定宽度
- subGridLayout->addWidget(buttonLeftTop, 4, 3, 1, 1); // 添加按钮到4行3列
- connect(buttonLeftTop, &QPushButton::clicked, this, [=]() {
- XY_DOUBLE_STRUCT position = BondGetAxisPosition("BondHead", m_vecSubMatrixs[subVectorIndex].LeftTopPoint);
- doubleSpinBoxLeftTopX->setValue(position.x); // 更新 X 轴
- doubleSpinBoxLeftTopY->setValue(position.y); // 更新 Y 轴
- });
- QPushButton* buttonMoveToLeftTop = new QPushButton("MT", subWidget);
- buttonMoveToLeftTop->setFixedWidth(31); // 设置固定宽度
- subGridLayout->addWidget(buttonMoveToLeftTop, 4, 4, 1, 1); // 添加按钮到4行3列
- connect(buttonMoveToLeftTop, &QPushButton::clicked, this, [=]() {
- XY_DOUBLE_STRUCT position = BondMoveToXYAxisPosition("BondHead", m_vecSubMatrixs[subVectorIndex].LeftTopPoint);
- });
- // Right Top Position X and Y
- QPushButton* buttonRightTop = new QPushButton("GP", subWidget);
- buttonRightTop->setFixedWidth(31); // 设置固定宽度
- subGridLayout->addWidget(buttonRightTop, 5, 3, 1, 1); // 添加按钮到5行3列
- connect(buttonRightTop, &QPushButton::clicked, this, [=]() {
- XY_DOUBLE_STRUCT position = BondGetAxisPosition("BondHead", m_vecSubMatrixs[subVectorIndex].RightTopPoint);
- doubleSpinBoxRightTopX->setValue(position.x); // 更新 X 轴
- doubleSpinBoxRightTopY->setValue(position.y); // 更新 Y 轴
- });
- QPushButton* buttonMoveToRightTop = new QPushButton("MT", subWidget);
- buttonMoveToRightTop->setFixedWidth(31); // 设置固定宽度
- subGridLayout->addWidget(buttonMoveToRightTop, 5, 4, 1, 1); // 添加按钮到4行3列
- connect(buttonMoveToRightTop, &QPushButton::clicked, this, [=]() {
- XY_DOUBLE_STRUCT position = BondMoveToXYAxisPosition("BondHead", m_vecSubMatrixs[subVectorIndex].RightTopPoint);
- });
- // Right Bottom Position X and Y
- QPushButton* buttonRightButtom = new QPushButton("GP", subWidget);
- buttonRightButtom->setFixedWidth(31); // 设置固定宽度
- subGridLayout->addWidget(buttonRightButtom, 6, 3, 1, 1); // 添加按钮到6行3列
- connect(buttonRightButtom, &QPushButton::clicked, this, [=]() {
- XY_DOUBLE_STRUCT position = BondGetAxisPosition("BondHead", m_vecSubMatrixs[subVectorIndex].RightBottomPoint);
- doubleSpinBoxRightButtomX->setValue(position.x); // 更新 X 轴
- doubleSpinBoxRightButtomY->setValue(position.y); // 更新 Y 轴
- });
- QPushButton* buttonMoveToRightButtom = new QPushButton("MT", subWidget);
- buttonMoveToRightButtom->setFixedWidth(31); // 设置固定宽度
- subGridLayout->addWidget(buttonMoveToRightButtom, 6, 4, 1, 1); // 添加按钮到4行3列
- connect(buttonMoveToRightButtom, &QPushButton::clicked, this, [=]() {
- XY_DOUBLE_STRUCT position = BondMoveToXYAxisPosition("BondHead", m_vecSubMatrixs[subVectorIndex].RightBottomPoint);
- });
- //layout->addLayout(subGridLayout, 11, 0);
- QFrame* line = new QFrame(subWidget);
- line->setFrameShape(QFrame::NoFrame); // 移除默认框架
- line->setFixedHeight(2); // 设置固定高度
- line->setStyleSheet("background-color: #C7CAEB;");
- subGridLayout->addWidget(line, 10, 0, 1, 4);
- layout->addWidget(subWidget);
- m_mapSubWidgetIndex.insert(subWidget, subVectorIndex);
- spinBoxRow->setValue(subMatrix.MatrixRow);
- spinBoxCol->setValue(subMatrix.MatrixCol);
- doubleSpinBoxLeftTopX->setValue(subMatrix.LeftTopPoint.x);
- doubleSpinBoxLeftTopY->setValue(subMatrix.LeftTopPoint.y);
- doubleSpinBoxRightTopX->setValue(subMatrix.RightTopPoint.x);
- doubleSpinBoxRightTopY->setValue(subMatrix.RightTopPoint.y);
- doubleSpinBoxRightButtomX->setValue(subMatrix.RightBottomPoint.x);
- doubleSpinBoxRightButtomY->setValue(subMatrix.RightBottomPoint.y);
- connect(spinBoxRow, &SpinBox::editDone, this, [=]() {
- auto it = m_mapSubWidgetIndex.find(subWidget);
- m_vecSubMatrixs[it.value()].MatrixRow = spinBoxRow->value();
- });
- connect(spinBoxCol, &SpinBox::editDone, this, [=]() {
- auto it = m_mapSubWidgetIndex.find(subWidget);
- m_vecSubMatrixs[it.value()].MatrixCol = spinBoxCol->value();
- });
- connect(doubleSpinBoxLeftTopX, &DoubleSpinBox::editDone, this, [=]() {
- auto it = m_mapSubWidgetIndex.find(subWidget);
- m_vecSubMatrixs[it.value()].LeftTopPoint.x = doubleSpinBoxLeftTopX->value();
- });
- connect(doubleSpinBoxLeftTopY, &DoubleSpinBox::editDone, this, [=]() {
- auto it = m_mapSubWidgetIndex.find(subWidget);
- m_vecSubMatrixs[it.value()].LeftTopPoint.y = doubleSpinBoxLeftTopY->value();
- });
- connect(doubleSpinBoxRightTopX, &DoubleSpinBox::editDone, this, [=]() {
- auto it = m_mapSubWidgetIndex.find(subWidget);
- m_vecSubMatrixs[it.value()].RightTopPoint.x = doubleSpinBoxRightTopX->value();
- });
- connect(doubleSpinBoxRightTopY, &DoubleSpinBox::editDone, this, [=]() {
- auto it = m_mapSubWidgetIndex.find(subWidget);
- m_vecSubMatrixs[it.value()].RightTopPoint.y = doubleSpinBoxRightTopY->value();
- });
- connect(doubleSpinBoxRightButtomX, &DoubleSpinBox::editDone, this, [=]() {
- auto it = m_mapSubWidgetIndex.find(subWidget);
- m_vecSubMatrixs[it.value()].RightBottomPoint.x = doubleSpinBoxRightButtomX->value();
- });
- connect(doubleSpinBoxRightButtomY, &DoubleSpinBox::editDone, this, [=]() {
- auto it = m_mapSubWidgetIndex.find(subWidget);
- m_vecSubMatrixs[it.value()].RightBottomPoint.y = doubleSpinBoxRightButtomY->value();
- });
- connect(lineEditNoBondPts, &QLineEdit::textChanged, this, [=]() {
- auto it = m_mapSubWidgetIndex.find(subWidget);
- });
- }
- bool BondMatrixProgramPage::eventFilter(QObject* obj, QEvent* event) {
- // 捕获鼠标点击事件(QEvent::MouseButtonPress)
- if (event->type() == QEvent::MouseButtonPress) {
- // 处理 QComboBox 的点击事件
- auto* comboBox = qobject_cast<QComboBox*>(obj);
- if (comboBox) {
- // 当BondInfo 的 QComboBox 被点击时执行 onComboBoxPopupBondInfo()
- if (comboBox == ui.comboBoxCurrentPara || comboBox->objectName() == QString::fromUtf8("comboBoxParagramSet")) {
- onComboBoxPopupBondInfo(comboBox);
- return false; // 拦截事件,防止进一步传播
- }
- //其他组件单独控制
- }
- // 处理 QLineEdit 的点击事件
- auto* lineEdit = qobject_cast<QLineEdit*>(obj);
- if (lineEdit) {
- // lineEditNoBondPts 点击事件
- if (lineEdit->objectName() == QString::fromUtf8("lineEditNoBondPts")) {
- int index = lineEdit->property("vectorIndex").toInt(); // 当前矩阵索引
- int parentIndex = lineEdit->property("parentMatrixIndex").toInt(); // 父矩阵索引
- onNoBondPtsClicked(lineEdit, index, parentIndex); // 传递父矩阵索引
- return true; // 拦截事件
- }
- //其他组件点击事件
- }
- }
- // 捕获鼠标滚轮事件(QEvent::Wheel)
- if (event->type() == QEvent::Wheel) {
- auto* comboBox = qobject_cast<QComboBox*>(obj);
- if (comboBox) {
- // 阻止滚轮事件,不让它改变选中的项
- return true; // 阻止滚轮事件的传播
- }
- }
- return QWidget::eventFilter(obj, event);
- }
- void BondMatrixProgramPage::onNoBondPtsClicked(QLineEdit* lineEdit, int index, int parentIndex) {
- if (parentIndex != -1)
- {
- // 处理子矩阵的操作
- if (index < 0 || index >= m_vecSubMatrixs.size()) return;
- const auto& subMatrix = m_vecSubMatrixs[index];
- NoBondPtEditDialog dlg(subMatrix.MatrixRow, subMatrix.MatrixCol, subMatrix.VecNoBondPt, this);
- if (dlg.exec() == QDialog::Accepted)
- {
- QVector<XY_LONG_STRUCT> selected = dlg.getSelectedPoints();
- m_vecSubMatrixs[index].VecNoBondPt = std::vector<XY_LONG_STRUCT>(selected.begin(), selected.end());
- QStringList ptList;
- for (const auto& pt : selected)
- ptList << QString("(%1,%2)").arg(pt.x).arg(pt.y);
- lineEdit->setText(ptList.join(" "));
- }
- // 这里可以用 parentIndex 来关联父矩阵(即大矩阵)做相应的操作
- }
- else
- {
- // 处理大矩阵的操作
- if (index < 0 || index >= m_vectBondMatrixs.size()) return;
- const auto& bondMatrix = m_vectBondMatrixs[index];
- NoBondPtEditDialog dlg(bondMatrix.BondMatrixRow, bondMatrix.BondMatrixCol, bondMatrix.VecNoBondPt, this);
- if (dlg.exec() == QDialog::Accepted)
- {
- QVector<XY_LONG_STRUCT> selected = dlg.getSelectedPoints();
- m_vectBondMatrixs[index].VecNoBondPt = std::vector<XY_LONG_STRUCT>(selected.begin(), selected.end());
- QStringList ptList;
- for (const auto& pt : selected)
- ptList << QString("(%1,%2)").arg(pt.x).arg(pt.y);
- lineEdit->setText(ptList.join(" "));
- }
- // 这里也可以用 parentIndex 来关联父矩阵(即大矩阵)做相应的操作
- }
- }
- void BondMatrixProgramPage::AddMatrixParam()
- {
- }
- void BondMatrixProgramPage::UpdatePageParam()
- {
- int dieSourceIndex = 0;
- if (m_curBondInfo.eDieSource == DIE_SOURCE::BY_WAFER)
- {
- dieSourceIndex = 1;
- }
- else if (m_curBondInfo.eDieSource == DIE_SOURCE::BY_WAFFLE)
- {
- dieSourceIndex = 0;
- }
- ui.comboBoxDieSource->setCurrentIndex(dieSourceIndex);
- ui.checkBoxIsCalib ->setChecked(m_curBondInfo.bTransferPREnable);
- ui.checkBoxIsAllBondAln->setChecked(m_curBondInfo.bAllBondAlnEnable);
- ui.checkBoxIsPcbAln->setChecked(m_curBondInfo.bPcbAlnEnable);
- //ui.spinBoxPickNozzleID->setValue(m_curBondInfo.iPickHeadId);
- ui.spinBoxDieHeight->setValue(m_curBondInfo.dDieHeight);
- m_isComBoxUpdating = true;
- // 初始化 并设置默认选项
- // 吸嘴
- ui.comboBoxPickNozzleID->clear();
- ui.comboBoxBondNozzleID->clear();
- // 固后
- ui.comboBoxPostBondTemp->clear();
- // 模板
- ui.comboBoxPickTempID->clear();
- ui.comboBoxPreBondTemp->clear();
- ui.comboBoxBondTemp->clear();
- ui.comboBoxLookUpTemp->clear();
- ui.comboBoxCalibPickTemp->clear();
- ui.comboBoxPcbAlnPRStrategyId->clear();
- //吸嘴Combox填充
- for (const auto& nozzleData : m_vecNozzles) {
- ui.comboBoxPickNozzleID->addItem(QString::number(nozzleData), nozzleData); // 设置数据
- ui.comboBoxBondNozzleID->addItem(QString::number(nozzleData), nozzleData); // 设置数据
- }
- //模板ComBox填充
- for (const auto& templateData : m_vecPrTemplate) {
- ui.comboBoxPickTempID->addItem(QString::number(templateData.iTemplateId), templateData.iTemplateId);
- ui.comboBoxPreBondTemp->addItem(QString::number(templateData.iTemplateId), templateData.iTemplateId);
- ui.comboBoxBondTemp->addItem(QString::number(templateData.iTemplateId), templateData.iTemplateId);
- ui.comboBoxLookUpTemp->addItem(QString::number(templateData.iTemplateId), templateData.iTemplateId);
- ui.comboBoxCalibPickTemp->addItem(QString::number(templateData.iTemplateId), templateData.iTemplateId);
- ui.comboBoxPcbAlnPRStrategyId->addItem(QString::number(templateData.iTemplateId), templateData.iTemplateId);
- }
- for (const auto& strategy : m_vecPrStrategy) {
- ui.comboBoxPickTempID->addItem(QString::number(strategy.iStrategyId), strategy.iStrategyId);
- ui.comboBoxPreBondTemp->addItem(QString::number(strategy.iStrategyId), strategy.iStrategyId);
- ui.comboBoxBondTemp->addItem(QString::number(strategy.iStrategyId), strategy.iStrategyId);
- ui.comboBoxLookUpTemp->addItem(QString::number(strategy.iStrategyId), strategy.iStrategyId);
- ui.comboBoxCalibPickTemp->addItem(QString::number(strategy.iStrategyId), strategy.iStrategyId);
- ui.comboBoxPcbAlnPRStrategyId->addItem(QString::number(strategy.iStrategyId), strategy.iStrategyId);
- }
- // 固后Combox填充
- for (const auto& bondInspData : m_vecPrBondInsp) {
- ui.comboBoxPostBondTemp->addItem(QString::number(bondInspData.iID), bondInspData.iID); // 设置数据
- }
- m_isComBoxUpdating = false;
- // 吸嘴
- safeSetComboBoxIndex(ui.comboBoxPickNozzleID, m_curBondInfo.iPickHeadId);
- safeSetComboBoxIndex(ui.comboBoxBondNozzleID, m_curBondInfo.iBondHeadId);
- // --- PostBondTemp ---
- //ui.comboBoxPostBondTemp->addItem(QString::number(m_curBondInfo.iBondBackPRStrategyId), m_curBondInfo.iBondBackPRStrategyId); // 设置数据
- //int index3 = ui.comboBoxPostBondTemp->findData(m_curBondInfo.iBondBackPRStrategyId);
- //ui.comboBoxPostBondTemp->setCurrentIndex(ui.comboBoxPostBondTemp->findData(m_curBondInfo.iBondBackPRStrategyId)); // 设置默认项
- safeSetComboBoxIndex(ui.comboBoxPostBondTemp, m_curBondInfo.iBondBackPRStrategyId);
- // --- PickTempID ---
- safeSetComboBoxIndex(ui.comboBoxPickTempID, m_curBondInfo.iPickPRStrategyId);
- // --- PreBondTemp ---
- safeSetComboBoxIndex(ui.comboBoxPreBondTemp, m_curBondInfo.iBondFrontPRStrategyId);
- // --- BondTemp ---
- safeSetComboBoxIndex(ui.comboBoxBondTemp, m_curBondInfo.iBondAlnPRStrategyId);
- // --- LookUpTemp ---
- safeSetComboBoxIndex(ui.comboBoxLookUpTemp, m_curBondInfo.iLookUpPRStrategyId);
- // --- CalibPickTemp ---
- safeSetComboBoxIndex(ui.comboBoxCalibPickTemp, m_curBondInfo.iCalibPRStrategyId);
- // --- PcbAlnPRStrategy ---
- safeSetComboBoxIndex(ui.comboBoxPcbAlnPRStrategyId, m_curBondInfo.iPcbAlnPRStrategyId);
- ui.doubleSpinBoxBondOffsetX->setValue(m_curBondInfo.stOffset.x);
- ui.doubleSpinBoxBondOffsetY->setValue(m_curBondInfo.stOffset.y);
- ui.doubleSpinBoxBondOffsetAngle->setValue(m_curBondInfo.stOffset.a);
- UpdatePagePickPlaceParam();
- restoreBondInfoDefaultStyles();
- }
- void BondMatrixProgramPage::restoreBondInfoDefaultStyles() {
- // BondInfo恢复控件的默认样式
- ui.comboBoxDieSource->setStyleSheet("");
- ui.checkBoxIsCalib->setStyleSheet("");
- ui.checkBoxIsAllBondAln->setStyleSheet("");
- ui.checkBoxIsPcbAln->setStyleSheet("");
- ui.spinBoxDieHeight->setStyleSheet("");
- ui.comboBoxPickNozzleID->setStyleSheet("");
- ui.comboBoxPostBondTemp->setStyleSheet("");
- ui.comboBoxPickTempID->setStyleSheet("");
- ui.comboBoxPreBondTemp->setStyleSheet("");
- ui.comboBoxBondTemp->setStyleSheet("");
- ui.comboBoxLookUpTemp->setStyleSheet("");
- ui.comboBoxCalibPickTemp->setStyleSheet("");
- ui.comboBoxPcbAlnPRStrategyId->setStyleSheet("");
- ui.comboBoxCurrentPara_Pick1->setStyleSheet("");
- ui.comboBoxCurrentPara_Pick2->setStyleSheet("");
- ui.comboBoxCurrentPara_Place1->setStyleSheet("");
- ui.comboBoxCurrentPara_Place2->setStyleSheet("");
- ui.comboBoxBondNozzleID->setStyleSheet("");
- ui.doubleSpinBoxBondOffsetX->setStyleSheet("");
- ui.doubleSpinBoxBondOffsetY->setStyleSheet("");
- ui.doubleSpinBoxBondOffsetAngle->setStyleSheet("");
- ui.comboBoxPostBondTemp->setStyleSheet("");
- ui.comboBoxPickTempID->setStyleSheet("");
- ui.comboBoxPreBondTemp->setStyleSheet("");
- ui.comboBoxBondTemp->setStyleSheet("");
- ui.comboBoxLookUpTemp->setStyleSheet("");
- ui.comboBoxCalibPickTemp->setStyleSheet("");
- ui.comboBoxPcbAlnPRStrategyId->setStyleSheet("");
- ui.comboBoxCurrentPara_Pick1->setStyleSheet("");
- ui.comboBoxCurrentPara_Pick2->setStyleSheet("");
- ui.comboBoxCurrentPara_Place1->setStyleSheet("");
- ui.comboBoxCurrentPara_Place2->setStyleSheet("");
- restorePick1DefaultStyles();
- restorePick2DefaultStyles();
- restorePlace1DefaultStyles();
- restorePlccle2DefaultStyles();
- }
- void BondMatrixProgramPage::restorePick1DefaultStyles() {
- // 取/固晶恢复控件的原始样式
- ui.checkBoxPickBlockCheck->setStyleSheet(""); // 恢复原样式
- ui.checkBoxPickBlockCheck_2->setStyleSheet("");
- ui.checkBoxBondBlockCheck->setStyleSheet("");
- ui.checkBoxBondBlockCheck_2->setStyleSheet("");
- ui.checkBoxPickLoseCheck->setStyleSheet("");
- ui.checkBoxPickLoseCheck_2->setStyleSheet("");
- ui.checkBoxBondLoseCheck->setStyleSheet("");
- ui.checkBoxBondLoseCheck_2->setStyleSheet("");
- ui.checkBoxPickFindForceCheck->setStyleSheet("");
- ui.checkBoxPickFindForceCheck_2->setStyleSheet("");
- ui.checkBoxBondFindForce->setStyleSheet("");
- ui.checkBoxBondFindForce_2->setStyleSheet("");
- ui.doubleSpinBoxPrePickZ->setStyleSheet("");
- ui.doubleSpinBoxPickForce->setStyleSheet("");
- ui.doubleSpinBoxPickPosZ->setStyleSheet("");
- ui.spinBoxPickGrabDelay->setStyleSheet("");
- ui.spinBoxPickDelay->setStyleSheet("");
- ui.spinBoxPickBlockCheckDelay->setStyleSheet("");
- ui.spinBoxPickVacDelay->setStyleSheet("");
- ui.spinBoxPickBlowDelay->setStyleSheet("");
- }
- void BondMatrixProgramPage::restorePick2DefaultStyles() {
- // 恢复中转台取晶相关控件样式
- ui.checkBoxPickBlockCheck_2->setStyleSheet("");
- ui.checkBoxPickLoseCheck_2->setStyleSheet("");
- ui.checkBoxPickFindForceCheck_2->setStyleSheet("");
- ui.doubleSpinBoxPrePickZ_2->setStyleSheet("");
- ui.doubleSpinBoxPickForce_2->setStyleSheet("");
- ui.doubleSpinBoxPickPosZ_2->setStyleSheet("");
- ui.spinBoxPickGrabDelay_2->setStyleSheet("");
- ui.spinBoxPickDelay_2->setStyleSheet("");
- ui.spinBoxPickBlockCheckDelay_2->setStyleSheet("");
- ui.spinBoxPickVacDelay_2->setStyleSheet("");
- ui.spinBoxPickBlowDelay_2->setStyleSheet("");
- }
- void BondMatrixProgramPage::restorePlace1DefaultStyles() {
- // 恢复中转台放晶相关控件样式
- ui.checkBoxBondBlockCheck->setStyleSheet("");
- ui.checkBoxBondLoseCheck->setStyleSheet("");
- ui.checkBoxBondFindForce->setStyleSheet("");
- ui.doubleSpinBoxPreBondPosZ->setStyleSheet("");
- ui.doubleSpinBoxBondForce->setStyleSheet("");
- ui.doubleSpinBoxBondPosZ->setStyleSheet("");
- ui.spinBoxBondGrabDelay->setStyleSheet("");
- ui.spinBoxBondDelay->setStyleSheet("");
- ui.spinBoxBondBlockCheckDelay->setStyleSheet("");
- ui.spinBoxBondVacDelay->setStyleSheet("");
- ui.spinBoxBondBlowDelay->setStyleSheet("");
- }
- void BondMatrixProgramPage::restorePlccle2DefaultStyles() {
- // 恢复固晶台固晶相关控件样式
- ui.checkBoxBondBlockCheck_2->setStyleSheet("");
- ui.checkBoxBondLoseCheck_2->setStyleSheet("");
- ui.checkBoxBondFindForce_2->setStyleSheet("");
- ui.doubleSpinBoxPreBondPosZ_2->setStyleSheet("");
- ui.doubleSpinBoxBondForce_2->setStyleSheet("");
- ui.doubleSpinBoxBondPosZ_2->setStyleSheet("");
- ui.spinBoxBondGrabDelay_2->setStyleSheet("");
- ui.spinBoxBondDelay_2->setStyleSheet("");
- ui.spinBoxBondBlockCheckDelay_2->setStyleSheet("");
- ui.spinBoxBondVacDelay_2->setStyleSheet("");
- ui.spinBoxBondBlowDelay_2->setStyleSheet("");
- }
- void BondMatrixProgramPage::UpdatePagePickPlaceParam()
- {
- m_isComBoxUpdating = true;
- ui.comboBoxCurrentPara_Pick1->clear();
- ui.comboBoxCurrentPara_Pick2->clear();
- ui.comboBoxCurrentPara_Place1->clear();
- ui.comboBoxCurrentPara_Pick2->clear();
- //取/固晶参数
- for (const auto& param : m_vecParam) {
- ui.comboBoxCurrentPara_Pick1->addItem(QString::number(param.iId), param.iId);
- ui.comboBoxCurrentPara_Pick2->addItem(QString::number(param.iId), param.iId);
- ui.comboBoxCurrentPara_Place1->addItem(QString::number(param.iId), param.iId);
- ui.comboBoxCurrentPara_Place2->addItem(QString::number(param.iId), param.iId);
- }
- m_isComBoxUpdating = false;
- // --- 取晶头取晶 ---
- safeSetComboBoxIndex(ui.comboBoxCurrentPara_Pick1, m_curBondInfo.iPickParamId);
- // --- 中转台取晶 ---
- safeSetComboBoxIndex(ui.comboBoxCurrentPara_Pick2, m_curBondInfo.iCalibPickParamId);
- // --- 中转台固晶 ---
- safeSetComboBoxIndex(ui.comboBoxCurrentPara_Place1, m_curBondInfo.iCalibBondParamId);
- // --- 固晶台固晶 ---
- safeSetComboBoxIndex(ui.comboBoxCurrentPara_Place2, m_curBondInfo.iBondParamId);
- //m_tempWaferPickParam = m_curWaferPickParam;
- //m_tempCalibPlaceParam = m_curCalibPlaceParam;
- //m_tempCalibPickParam = m_curCalibPickParam;
- //m_tempBondParam = m_curBondParam;
- UpdatePagePick1Param();
- UpdatePagePick2Param();
- UpdatePageBond1Param();
- UpdatePageBond2Param();
- updateFourParamDeleteButtonStatus();
- }
- //取/固晶参数另存为
- int BondMatrixProgramPage::ParamSaveAsEvent(ns_db::PICKBOND_PARAM_STRUCT &m_curToSaveAsParam)
- {
- int iToSaveAsParamId;
- m_manageDB->GetCProduct()->AddBondParam(m_curToSaveAsParam, iToSaveAsParamId);
- // 判断传入的是哪一个参数,并相应修改m_curBondInfo中的ID
- if (&m_curToSaveAsParam == &m_curWaferPickParam)
- {
- m_curBondInfo.iPickParamId = iToSaveAsParamId;
- }
- else if (&m_curToSaveAsParam == &m_curCalibPlaceParam)
- {
- m_curBondInfo.iCalibBondParamId = iToSaveAsParamId;
- }
- else if (&m_curToSaveAsParam == &m_curCalibPickParam)
- {
- m_curBondInfo.iCalibPickParamId = iToSaveAsParamId;
- }
- else if (&m_curToSaveAsParam == &m_curBondParam)
- {
- m_curBondInfo.iBondParamId = iToSaveAsParamId;
- }
- m_manageDB->GetCProduct()->GetBondParam(iToSaveAsParamId, m_curToSaveAsParam);
- m_vecParam.push_back(m_curToSaveAsParam);// = m_manageDB->GetCProduct()->GetAllBondInfoData();
- // 填充 QComboBox
- UpdatePagePickPlaceParam();
- return iToSaveAsParamId;
- }
- //BondInfo另存为
- int BondMatrixProgramPage::BondInfoParamSaveAsEvent()
- {
- //int iWaferPickParamId,iCalibPlaceParamId,iCalibPickParamId,iBondParamId;
- //m_manageDB->GetCProduct()->AddBondParam(m_curWaferPickParam, iWaferPickParamId); //SetBondParam(m_curWaferPickParam.iId, m_curWaferPickParam);
- //m_manageDB->GetCProduct()->AddBondParam(m_curCalibPlaceParam, iCalibPlaceParamId);
- //m_manageDB->GetCProduct()->AddBondParam(m_curCalibPickParam, iCalibPickParamId);
- //m_manageDB->GetCProduct()->AddBondParam(m_curBondParam, iBondParamId);
- int iInfoId;
- m_manageDB->GetCProduct()->AddBondInfoData(m_curBondInfo, iInfoId);
- ns_db::BOND_INFO_STRUCT newBondInfo;
- m_manageDB->GetCProduct()->GetBondInfoData(iInfoId, newBondInfo);
- m_vecBondInfoData.push_back(newBondInfo);// = m_manageDB->GetCProduct()->GetAllBondInfoData();
- // 填充 QComboBox
- ui.comboBoxCurrentPara->clear();
- for (const auto& bondMatrix : m_vecBondInfoData) {
- QString itemText = QString::number(bondMatrix.iInfoId);
- ui.comboBoxCurrentPara->addItem(itemText, bondMatrix.iInfoId);
- }
- ui.comboBoxCurrentPara->setCurrentIndex(ui.comboBoxCurrentPara->findData(iInfoId)); // 设置默认项
-
- updateDeleteButtonStatus(canDeleteBondInfo(iInfoId), ui.pushButtonDeleteParam);
- updateFourParamDeleteButtonStatus();
- return iInfoId;
- }
- void BondMatrixProgramPage::ParamChangeEvent()
- {
- m_manageDB->GetCProduct()->SetBondInfoData(m_curBondInfo.iInfoId, m_curBondInfo);
- m_manageDB->GetCProduct()->SetBondParam(m_curWaferPickParam.iId, m_curWaferPickParam);
- m_manageDB->GetCProduct()->SetBondParam(m_curCalibPlaceParam.iId, m_curCalibPlaceParam);
- m_manageDB->GetCProduct()->SetBondParam(m_curCalibPickParam.iId, m_curCalibPickParam);
- m_manageDB->GetCProduct()->SetBondParam(m_curBondParam.iId, m_curBondParam);
- m_tempWaferPickParam = m_curWaferPickParam;
- m_tempCalibPlaceParam = m_curCalibPlaceParam;
- m_tempCalibPickParam = m_curCalibPickParam;
- m_tempBondParam = m_curBondParam;
- m_vecBondInfoData = m_manageDB->GetCProduct()->GetAllBondInfoData();
- m_tempBondInfo = m_curBondInfo;
- updateFourParamDeleteButtonStatus();
- CProduct* _Product = m_manageDB->GetCProduct();
- UpdatePageParam();
- }
- void BondMatrixProgramPage::MatrixChangeEvent()
- {
- //TODO:此处可能有问题,可改成后端更新,没有相应ID则添加的形式
- m_manageDB->GetCProduct()->SetAllBondMatrix(m_vectBondMatrixs, true);
- m_manageDB->GetCProduct()->SetAllPointMatrix(m_vecSubMatrixs, true);
- /*for (PROGRAM_BOND_MATRIX_STRUCT& bondMatrix : m_vectBondMatrixs)
- {
- m_manageDB->GetCProduct()->SetBondMatrix(bondMatrix.BondMatrixId, bondMatrix);
- }*/
- /*for (PROGRAM_POINT_MATRIX_STRUCT& pointMatrix : m_vecSubMatrixs)
- {
- m_manageDB->GetCProduct()->SetPointMatrix(pointMatrix.MatrixId, pointMatrix);
- }*/
- CProduct* _Product = m_manageDB->GetCProduct();
- }
- void BondMatrixProgramPage::UpdatePagePick1Param()
- {
- //"取晶头取晶"
- {
- ui.checkBoxPickBlockCheck->setChecked(m_curWaferPickParam.bCheckBlock);
- ui.checkBoxPickLoseCheck->setChecked(m_curWaferPickParam.bCheckLose);
- ui.checkBoxPickFindForceCheck->setChecked(m_curWaferPickParam.bFindForce);
- ui.doubleSpinBoxPrePickZ->setValue(m_curWaferPickParam.dPreLevOffset);
- ui.doubleSpinBoxPickForce->setValue(m_curWaferPickParam.dForce);
- ui.doubleSpinBoxPickPosZ->setValue(m_curWaferPickParam.dWorkLevOffset);
- ui.spinBoxPickGrabDelay->setValue(m_curWaferPickParam.iGrabDelay);
- ui.spinBoxPickDelay->setValue(m_curWaferPickParam.iPickOrBondDelay);
- ui.spinBoxPickBlockCheckDelay->setValue(m_curWaferPickParam.iBlockOrLoseDelay);
- ui.spinBoxPickVacDelay->setValue(m_curWaferPickParam.iVacuumDelay);
- ui.spinBoxPickBlowDelay->setValue(m_curWaferPickParam.iBlowDelay);
- //ui.doubleSpinBoxPrePickZ->setEnabled(!ui.checkBoxPickFindForceCheck->isChecked());
- ui.doubleSpinBoxPickPosZ->setEnabled(!ui.checkBoxPickFindForceCheck->isChecked());
- }
- // 更新样式
- if (m_curWaferPickParam.bCheckBlock == m_tempWaferPickParam.bCheckBlock)
- ui.checkBoxPickLoseCheck->setStyleSheet(""); // 恢复默认样式
- else
- ui.checkBoxPickLoseCheck->setStyleSheet("color: red;"); // 字体颜色变红
- if (m_curWaferPickParam.bCheckLose == m_tempWaferPickParam.bCheckLose)
- ui.checkBoxPickLoseCheck->setStyleSheet(""); // 恢复默认样式
- else
- ui.checkBoxPickLoseCheck->setStyleSheet("color: red;"); // 字体颜色变红
- if (m_curWaferPickParam.bFindForce == m_tempWaferPickParam.bFindForce)
- ui.checkBoxPickFindForceCheck->setStyleSheet(""); // 恢复默认样式
- else
- ui.checkBoxPickFindForceCheck->setStyleSheet("color: red;"); // 字体颜色变红
- if (m_curWaferPickParam.dPreLevOffset == m_tempWaferPickParam.dPreLevOffset)
- ui.doubleSpinBoxPrePickZ->setStyleSheet(""); // 恢复默认样式
- else
- ui.doubleSpinBoxPrePickZ->setStyleSheet("color: red;"); // 字体颜色变红
- if (m_curWaferPickParam.dForce == m_tempWaferPickParam.dForce)
- ui.doubleSpinBoxPickForce->setStyleSheet(""); // 恢复默认样式
- else
- ui.doubleSpinBoxPickForce->setStyleSheet("color: red;"); // 字体颜色变红
- if (m_curWaferPickParam.dWorkLevOffset == m_tempWaferPickParam.dWorkLevOffset)
- ui.doubleSpinBoxPickPosZ->setStyleSheet(""); // 恢复默认样式
- else
- ui.doubleSpinBoxPickPosZ->setStyleSheet("color: red;"); // 字体颜色变红
- if (m_curWaferPickParam.iGrabDelay == m_tempWaferPickParam.iGrabDelay)
- ui.spinBoxPickGrabDelay->setStyleSheet(""); // 恢复默认样式
- else
- ui.spinBoxPickGrabDelay->setStyleSheet("color: red;"); // 字体颜色变红
- if (m_curWaferPickParam.iPickOrBondDelay == m_tempWaferPickParam.iPickOrBondDelay)
- ui.spinBoxPickDelay->setStyleSheet(""); // 恢复默认样式
- else
- ui.spinBoxPickDelay->setStyleSheet("color: red;"); // 字体颜色变红
- if (m_curWaferPickParam.iBlockOrLoseDelay == m_tempWaferPickParam.iBlockOrLoseDelay)
- ui.spinBoxPickBlockCheckDelay->setStyleSheet(""); // 恢复默认样式
- else
- ui.spinBoxPickBlockCheckDelay->setStyleSheet("color: red;"); // 字体颜色变红
- if (m_curWaferPickParam.iVacuumDelay == m_tempWaferPickParam.iVacuumDelay)
- ui.spinBoxPickVacDelay->setStyleSheet(""); // 恢复默认样式
- else
- ui.spinBoxPickVacDelay->setStyleSheet("color: red;"); // 字体颜色变红
- if (m_curWaferPickParam.iBlowDelay == m_tempWaferPickParam.iBlowDelay)
- ui.spinBoxPickBlowDelay->setStyleSheet(""); // 恢复默认样式
- else
- ui.spinBoxPickBlowDelay->setStyleSheet("color: red;"); // 字体颜色变红
- }
- void BondMatrixProgramPage::UpdatePagePick2Param()
- {
-
- //"中转台取晶"
- {
- ui.checkBoxPickBlockCheck_2->setChecked(m_curCalibPickParam.bCheckBlock);
- ui.checkBoxPickLoseCheck_2->setChecked(m_curCalibPickParam.bCheckLose);
- ui.checkBoxPickFindForceCheck_2->setChecked(m_curCalibPickParam.bFindForce);
- ui.doubleSpinBoxPrePickZ_2->setValue(m_curCalibPickParam.dPreLevOffset);
- ui.doubleSpinBoxPickForce_2->setValue(m_curCalibPickParam.dForce);
- ui.doubleSpinBoxPickPosZ_2->setValue(m_curCalibPickParam.dWorkLevOffset);
- ui.spinBoxPickGrabDelay_2->setValue(m_curCalibPickParam.iGrabDelay);
- ui.spinBoxPickDelay_2->setValue(m_curCalibPickParam.iPickOrBondDelay);
- ui.spinBoxPickBlockCheckDelay_2->setValue(m_curCalibPickParam.iBlockOrLoseDelay);
- ui.spinBoxPickVacDelay_2->setValue(m_curCalibPickParam.iVacuumDelay);
- ui.spinBoxPickBlowDelay_2->setValue(m_curCalibPickParam.iBlowDelay);
- //ui.doubleSpinBoxPrePickZ_2->setEnabled(!ui.checkBoxPickFindForceCheck_2->isChecked());
- ui.doubleSpinBoxPickPosZ_2->setEnabled(!ui.checkBoxPickFindForceCheck_2->isChecked());
- }
- // 判断复选框并更新样式
- if (m_curCalibPickParam.bCheckBlock == m_tempCalibPickParam.bCheckBlock)
- ui.checkBoxPickBlockCheck_2->setStyleSheet(""); // 恢复默认样式
- else
- ui.checkBoxPickBlockCheck_2->setStyleSheet("color: red;"); // 字体颜色变红
- if (m_curCalibPickParam.bCheckLose == m_tempCalibPickParam.bCheckLose)
- ui.checkBoxPickLoseCheck_2->setStyleSheet(""); // 恢复默认样式
- else
- ui.checkBoxPickLoseCheck_2->setStyleSheet("color: red;"); // 字体颜色变红
- if (m_curCalibPickParam.bFindForce == m_tempCalibPickParam.bFindForce)
- ui.checkBoxPickFindForceCheck_2->setStyleSheet(""); // 恢复默认样式
- else
- ui.checkBoxPickFindForceCheck_2->setStyleSheet("color: red;"); // 字体颜色变红
- // 判断 DoubleSpinBox 控件并更新样式
- if (m_curCalibPickParam.dPreLevOffset == m_tempCalibPickParam.dPreLevOffset)
- ui.doubleSpinBoxPrePickZ_2->setStyleSheet(""); // 恢复默认样式
- else
- ui.doubleSpinBoxPrePickZ_2->setStyleSheet("color: red;"); // 字体颜色变红
- if (m_curCalibPickParam.dForce == m_tempCalibPickParam.dForce)
- ui.doubleSpinBoxPickForce_2->setStyleSheet(""); // 恢复默认样式
- else
- ui.doubleSpinBoxPickForce_2->setStyleSheet("color: red;"); // 字体颜色变红
- if (m_curCalibPickParam.dWorkLevOffset == m_tempCalibPickParam.dWorkLevOffset)
- ui.doubleSpinBoxPickPosZ_2->setStyleSheet(""); // 恢复默认样式
- else
- ui.doubleSpinBoxPickPosZ_2->setStyleSheet("color: red;"); // 字体颜色变红
- // 判断 SpinBox 控件并更新样式
- if (m_curCalibPickParam.iGrabDelay == m_tempCalibPickParam.iGrabDelay)
- ui.spinBoxPickGrabDelay_2->setStyleSheet(""); // 恢复默认样式
- else
- ui.spinBoxPickGrabDelay_2->setStyleSheet("color: red;"); // 字体颜色变红
- if (m_curCalibPickParam.iPickOrBondDelay == m_tempCalibPickParam.iPickOrBondDelay)
- ui.spinBoxPickDelay_2->setStyleSheet(""); // 恢复默认样式
- else
- ui.spinBoxPickDelay_2->setStyleSheet("color: red;"); // 字体颜色变红
- if (m_curCalibPickParam.iBlockOrLoseDelay == m_tempCalibPickParam.iBlockOrLoseDelay)
- ui.spinBoxPickBlockCheckDelay_2->setStyleSheet(""); // 恢复默认样式
- else
- ui.spinBoxPickBlockCheckDelay_2->setStyleSheet("color: red;"); // 字体颜色变红
- if (m_curCalibPickParam.iVacuumDelay == m_tempCalibPickParam.iVacuumDelay)
- ui.spinBoxPickVacDelay_2->setStyleSheet(""); // 恢复默认样式
- else
- ui.spinBoxPickVacDelay_2->setStyleSheet("color: red;"); // 字体颜色变红
- if (m_curCalibPickParam.iBlowDelay == m_tempCalibPickParam.iBlowDelay)
- ui.spinBoxPickBlowDelay_2->setStyleSheet(""); // 恢复默认样式
- else
- ui.spinBoxPickBlowDelay_2->setStyleSheet("color: red;"); // 字体颜色变红
- }
- void BondMatrixProgramPage::UpdatePageBond1Param()
- {
- //"中转台放晶"
- {
- ui.checkBoxBondBlockCheck->setChecked(m_curCalibPlaceParam.bCheckBlock);
- ui.checkBoxBondLoseCheck->setChecked(m_curCalibPlaceParam.bCheckLose);
- ui.checkBoxBondFindForce->setChecked(m_curCalibPlaceParam.bFindForce);
- ui.doubleSpinBoxPreBondPosZ->setValue(m_curCalibPlaceParam.dPreLevOffset);
- ui.doubleSpinBoxBondForce->setValue(m_curCalibPlaceParam.dForce);
- ui.doubleSpinBoxBondPosZ->setValue(m_curCalibPlaceParam.dWorkLevOffset);
- ui.spinBoxBondGrabDelay->setValue(m_curCalibPlaceParam.iGrabDelay);
- ui.spinBoxBondDelay->setValue(m_curCalibPlaceParam.iPickOrBondDelay);
- ui.spinBoxBondBlockCheckDelay->setValue(m_curCalibPlaceParam.iBlockOrLoseDelay);
- ui.spinBoxBondVacDelay->setValue(m_curCalibPlaceParam.iVacuumDelay);
- ui.spinBoxBondBlowDelay->setValue(m_curCalibPlaceParam.iBlowDelay);
- ui.doubleSpinBoxPreBondPosZ->setEnabled(!ui.checkBoxBondFindForce->isChecked());
- ui.doubleSpinBoxBondPosZ->setEnabled(!ui.checkBoxBondFindForce->isChecked());
- }
- // 样式判断:根据条件更新样式
- if (m_curCalibPlaceParam.bCheckBlock == m_tempCalibPlaceParam.bCheckBlock)
- ui.checkBoxBondBlockCheck->setStyleSheet(""); // 恢复默认样式
- else
- ui.checkBoxBondBlockCheck->setStyleSheet("color: red;"); // 字体颜色变红
- if (m_curCalibPlaceParam.bCheckLose == m_tempCalibPlaceParam.bCheckLose)
- ui.checkBoxBondLoseCheck->setStyleSheet(""); // 恢复默认样式
- else
- ui.checkBoxBondLoseCheck->setStyleSheet("color: red;"); // 字体颜色变红
- if (m_curCalibPlaceParam.bFindForce == m_tempCalibPlaceParam.bFindForce)
- ui.checkBoxBondFindForce->setStyleSheet(""); // 恢复默认样式
- else
- ui.checkBoxBondFindForce->setStyleSheet("color: red;"); // 字体颜色变红
- // DoubleSpinBox 样式判断
- if (m_curCalibPlaceParam.dPreLevOffset == m_tempCalibPlaceParam.dPreLevOffset)
- ui.doubleSpinBoxPreBondPosZ->setStyleSheet(""); // 恢复默认样式
- else
- ui.doubleSpinBoxPreBondPosZ->setStyleSheet("color: red;"); // 字体颜色变红
- if (m_curCalibPlaceParam.dForce == m_tempCalibPlaceParam.dForce)
- ui.doubleSpinBoxBondForce->setStyleSheet(""); // 恢复默认样式
- else
- ui.doubleSpinBoxBondForce->setStyleSheet("color: red;"); // 字体颜色变红
- if (m_curCalibPlaceParam.dWorkLevOffset == m_tempCalibPlaceParam.dWorkLevOffset)
- ui.doubleSpinBoxBondPosZ->setStyleSheet(""); // 恢复默认样式
- else
- ui.doubleSpinBoxBondPosZ->setStyleSheet("color: red;"); // 字体颜色变红
- // SpinBox 样式判断
- if (m_curCalibPlaceParam.iGrabDelay == m_tempCalibPlaceParam.iGrabDelay)
- ui.spinBoxBondGrabDelay->setStyleSheet(""); // 恢复默认样式
- else
- ui.spinBoxBondGrabDelay->setStyleSheet("color: red;"); // 字体颜色变红
- if (m_curCalibPlaceParam.iPickOrBondDelay == m_tempCalibPlaceParam.iPickOrBondDelay)
- ui.spinBoxBondDelay->setStyleSheet(""); // 恢复默认样式
- else
- ui.spinBoxBondDelay->setStyleSheet("color: red;"); // 字体颜色变红
- if (m_curCalibPlaceParam.iBlockOrLoseDelay == m_tempCalibPlaceParam.iBlockOrLoseDelay)
- ui.spinBoxBondBlockCheckDelay->setStyleSheet(""); // 恢复默认样式
- else
- ui.spinBoxBondBlockCheckDelay->setStyleSheet("color: red;"); // 字体颜色变红
- if (m_curCalibPlaceParam.iVacuumDelay == m_tempCalibPlaceParam.iVacuumDelay)
- ui.spinBoxBondVacDelay->setStyleSheet(""); // 恢复默认样式
- else
- ui.spinBoxBondVacDelay->setStyleSheet("color: red;"); // 字体颜色变红
- if (m_curCalibPlaceParam.iBlowDelay == m_tempCalibPlaceParam.iBlowDelay)
- ui.spinBoxBondBlowDelay->setStyleSheet(""); // 恢复默认样式
- else
- ui.spinBoxBondBlowDelay->setStyleSheet("color: red;"); // 字体颜色变红
- }
- void BondMatrixProgramPage::UpdatePageBond2Param()
- {
- //"固晶台固晶"
- {
- ui.checkBoxBondBlockCheck_2->setChecked(m_curBondParam.bCheckBlock);
- ui.checkBoxBondLoseCheck_2->setChecked(m_curBondParam.bCheckLose);
- ui.checkBoxBondFindForce_2->setChecked(m_curBondParam.bFindForce);
- ui.doubleSpinBoxPreBondPosZ_2->setValue(m_curBondParam.dPreLevOffset);
- ui.doubleSpinBoxBondForce_2->setValue(m_curBondParam.dForce);
- ui.doubleSpinBoxBondPosZ_2->setValue(m_curBondParam.dWorkLevOffset);
- ui.spinBoxBondGrabDelay_2->setValue(m_curBondParam.iGrabDelay);
- ui.spinBoxBondDelay_2->setValue(m_curBondParam.iPickOrBondDelay);
- ui.spinBoxBondBlockCheckDelay_2->setValue(m_curBondParam.iBlockOrLoseDelay);
- ui.spinBoxBondVacDelay_2->setValue(m_curBondParam.iVacuumDelay);
- ui.spinBoxBondBlowDelay_2->setValue(m_curBondParam.iBlowDelay);
- //ui.doubleSpinBoxPreBondPosZ_2->setEnabled(!ui.checkBoxBondFindForce_2->isChecked());
- ui.doubleSpinBoxBondPosZ_2->setEnabled(!ui.checkBoxBondFindForce_2->isChecked());
- }
- // 更新样式:根据条件判断改变样式
- if (m_curBondParam.bCheckBlock == m_tempBondParam.bCheckBlock)
- ui.checkBoxBondBlockCheck_2->setStyleSheet(""); // 恢复默认样式
- else
- ui.checkBoxBondBlockCheck_2->setStyleSheet("color: red;"); // 字体颜色变红
- if (m_curBondParam.bCheckLose == m_tempBondParam.bCheckLose)
- ui.checkBoxBondLoseCheck_2->setStyleSheet(""); // 恢复默认样式
- else
- ui.checkBoxBondLoseCheck_2->setStyleSheet("color: red;"); // 字体颜色变红
- if (m_curBondParam.bFindForce == m_tempBondParam.bFindForce)
- ui.checkBoxBondFindForce_2->setStyleSheet(""); // 恢复默认样式
- else
- ui.checkBoxBondFindForce_2->setStyleSheet("color: red;"); // 字体颜色变红
- // 判断 DoubleSpinBox 样式
- if (m_curBondParam.dPreLevOffset == m_tempBondParam.dPreLevOffset)
- ui.doubleSpinBoxPreBondPosZ_2->setStyleSheet(""); // 恢复默认样式
- else
- ui.doubleSpinBoxPreBondPosZ_2->setStyleSheet("color: red;"); // 字体颜色变红
- if (m_curBondParam.dForce == m_tempBondParam.dForce)
- ui.doubleSpinBoxBondForce_2->setStyleSheet(""); // 恢复默认样式
- else
- ui.doubleSpinBoxBondForce_2->setStyleSheet("color: red;"); // 字体颜色变红
- if (m_curBondParam.dWorkLevOffset == m_tempBondParam.dWorkLevOffset)
- ui.doubleSpinBoxBondPosZ_2->setStyleSheet(""); // 恢复默认样式
- else
- ui.doubleSpinBoxBondPosZ_2->setStyleSheet("color: red;"); // 字体颜色变红
- // 判断 SpinBox 样式
- if (m_curBondParam.iGrabDelay == m_tempBondParam.iGrabDelay)
- ui.spinBoxBondGrabDelay_2->setStyleSheet(""); // 恢复默认样式
- else
- ui.spinBoxBondGrabDelay_2->setStyleSheet("color: red;"); // 字体颜色变红
- if (m_curBondParam.iPickOrBondDelay == m_tempBondParam.iPickOrBondDelay)
- ui.spinBoxBondDelay_2->setStyleSheet(""); // 恢复默认样式
- else
- ui.spinBoxBondDelay_2->setStyleSheet("color: red;"); // 字体颜色变红
- if (m_curBondParam.iBlockOrLoseDelay == m_tempBondParam.iBlockOrLoseDelay)
- ui.spinBoxBondBlockCheckDelay_2->setStyleSheet(""); // 恢复默认样式
- else
- ui.spinBoxBondBlockCheckDelay_2->setStyleSheet("color: red;"); // 字体颜色变红
- if (m_curBondParam.iVacuumDelay == m_tempBondParam.iVacuumDelay)
- ui.spinBoxBondVacDelay_2->setStyleSheet(""); // 恢复默认样式
- else
- ui.spinBoxBondVacDelay_2->setStyleSheet("color: red;"); // 字体颜色变红
- if (m_curBondParam.iBlowDelay == m_tempBondParam.iBlowDelay)
- ui.spinBoxBondBlowDelay_2->setStyleSheet(""); // 恢复默认样式
- else
- ui.spinBoxBondBlowDelay_2->setStyleSheet("color: red;"); // 字体颜色变红
- }
- void BondMatrixProgramPage::initPage()
- {
- m_manageDB = CManageDB::GetInstance();
- //if (m_manageDB == nullptr) return;
- m_pProduct = m_manageDB->GetCProduct();
- //if (m_pProduct == nullptr) return;
- m_TipMatrix = ns_mat::TipMatrix::GetInstance();
- m_pProgramCViewInterface = ns_module::CViewInterface::GetInstance();
- //从后端获取数据
- m_vectBondMatrixs = m_manageDB->GetCProduct()->GetBondMatrix();
- m_manageDB->GetCProduct()->GetAllPointMatrix(m_vecSubMatrixs);
- m_vecBondInfoData = m_manageDB->GetCProduct()->GetAllBondInfoData();
- //if (m_vectBondMatrixs.size() == 0) return;
- //for (int i = 0; i < m_vectBondMatrixs.size(); i++)
- //{
- // for (int j = 0; j < m_vectBondMatrixs[i].VecPointMatrixId.size(); j++)
- // {
- // PROGRAM_POINT_MATRIX_STRUCT subMatrix;
- // m_manageDB->GetCProduct()->GetPointMatrix(m_vectBondMatrixs[i].VecPointMatrixId[j], subMatrix);
- // m_vecSubMatrixs.push_back(subMatrix);
- // //AddMatrixPage(i, j, subMatrix);
- // }
- // AddOutMatrixPage(i, m_vectBondMatrixs[i], m_vecSubMatrixs);
- //}
- for (int i = 0; i < m_vectBondMatrixs.size(); i++)
- {
- AddOutMatrixPage(i, m_vectBondMatrixs[i], m_vecSubMatrixs);
- }
- //for (int i = 0; i < m_vectBondMatrixs[0].VecPointMatrixId.size(); ++i)
- //{
- // PROGRAM_POINT_MATRIX_STRUCT subMatrix;
- // m_manageDB->GetCProduct()->GetPointMatrix(m_vectBondMatrixs[0].VecPointMatrixId[i], subMatrix);
- // m_vecSubMatrixs.push_back(subMatrix);
- //}
- //m_manageDB->GetCProduct()->GetDieMatrix(m_vectBondMatrixs[0].VecPointMatrixId[0], m_vecSubMatrixs);
- ////显示矩阵数据
- //ui.spinBoxRow->setValue(m_vectBondMatrixs[0].BondMatrixRow);
- //ui.spinBoxCol->setValue(m_vectBondMatrixs[0].BondMatrixCol);
- //ui.doubleSpinBoxLeftTopX->setValue(m_vectBondMatrixs[0].LeftTopPoint.x);
- //ui.doubleSpinBoxLeftTopY->setValue(m_vectBondMatrixs[0].LeftTopPoint.y);
- //ui.doubleSpinBoxRightTopX->setValue(m_vectBondMatrixs[0].RightTopPoint.x);
- //ui.doubleSpinBoxRightTopY->setValue(m_vectBondMatrixs[0].RightTopPoint.y);
- //ui.doubleSpinBoxRightButtomX->setValue(m_vectBondMatrixs[0].RightBottomPoint.x);
- //ui.doubleSpinBoxRightButtomY->setValue(m_vectBondMatrixs[0].RightBottomPoint.y);
- //QString noBondPts = "";
- //bool firstTime = false;
- //for (XY_LONG_STRUCT& pt : m_vectBondMatrixs[0].VecNoBondPt)
- //{
- // if (firstTime)
- // {
- // noBondPts += "(" + QString::number(pt.x) + "," + QString::number(pt.y) + ")";
- // firstTime = true;
- // }
- // noBondPts += ";(" + QString::number(pt.x) + "," + QString::number(pt.y) + ")";
- //}
- //ui.lineEditNoBondPts->setText(noBondPts);
- ////显示子矩阵及数据
- //for (PROGRAM_POINT_MATRIX_STRUCT& subMatrix : m_vecSubMatrixs)
- //{
- // AddMatrixPage(subMatrix);
- //}
- //从后端获取参数, 一套数据
- CResources* pResources = CResources::GetInstance();
- //if (pResources == nullptr) return;
- CBondMatrix* pBondMatrix = pResources->GetBondMatrix();
- //if (pBondMatrix == nullptr) return;
- //AddOutMatrixPage(0, m_vectBondMatrixs[0], m_vecSubMatrixs);
- ui.comboBoxCurrentMatrix->clear();
- for (int i = 0; i < m_vectBondMatrixs.size(); i++)
- {
- // 显示 矩阵编号
- int _bondMatrixId = m_vectBondMatrixs[i].BondMatrixId;
- QString itemText = QString::number(_bondMatrixId);
- // 将 矩阵编号 添加到下拉框
- ui.comboBoxCurrentMatrix->addItem(itemText,_bondMatrixId);
- }
- if (!m_vectBondMatrixs.empty()) {
- ShowCurrentMatrix(m_vectBondMatrixs[0].BondMatrixId);
- }
- // 清空下拉框中的所有项
- ui.comboBoxCurrentPara->clear();
- // 重新填充下拉框选项,并更新 QMap 中的绑定关系
- for (const auto& bondMatrix : m_vecBondInfoData) {
- // 显示编号 iInfoId
- QString itemText = QString::number(bondMatrix.iInfoId);
- // 将 iInfoId 添加到下拉框
- ui.comboBoxCurrentPara->addItem(itemText, bondMatrix.iInfoId);
- }
- UpdateShowBondInfoData(m_vectBondMatrixs[0].BondInfoId);
- }
- void BondMatrixProgramPage::UpdateShowBondInfoData(UINT iInfoId) {
- if (iInfoId <= 0)return;
- //pBondMatrix->GetPintInfoByIndex(0, m_curPointInfo);
- m_manageDB->GetCProduct()->GetBondInfoData(iInfoId, m_curBondInfo);
- m_tempBondInfo = m_curBondInfo;
- m_manageDB->GetCProduct()->GetBondParam(m_curBondInfo.iPickParamId, m_curWaferPickParam);
- m_manageDB->GetCProduct()->GetBondParam(m_curBondInfo.iCalibBondParamId, m_curCalibPlaceParam);
- m_manageDB->GetCProduct()->GetBondParam(m_curBondInfo.iCalibPickParamId, m_curCalibPickParam);
- m_manageDB->GetCProduct()->GetBondParam(m_curBondInfo.iBondParamId, m_curBondParam);
- m_vecParam = m_manageDB->GetCProduct()->GetAllBondParamData();
- m_tempWaferPickParam = m_curWaferPickParam;
- m_tempCalibPlaceParam = m_curCalibPlaceParam;
- m_tempCalibPickParam = m_curCalibPickParam;
- m_tempBondParam = m_curBondParam;
- m_vecPrTemplate = m_manageDB->GetCProduct()->GetPrTemplate();
- m_vecPrStrategy = m_manageDB->GetCProduct()->GetPrStrategy();
- m_vecPrBondInsp = m_manageDB->GetCProduct()->GetPrBondInsp();
- m_TipMatrix->GetAllNozzleIndex(m_vecNozzles);
- ui.comboBoxCurrentPara->setCurrentIndex(ui.comboBoxCurrentPara->findData(iInfoId)); // 设置默认项
- updateDeleteButtonStatus(canDeleteBondInfo(iInfoId), ui.pushButtonDeleteParam);
- updateFourParamDeleteButtonStatus();
- //显示界面参数
- UpdatePageParam();
- }
|