RecipeExtrasWidget::RecipeExtrasWidget(QWidget* parent) : QWidget(parent), recipe(0) { setupUi(this); ratingChanged = false; connect( lineEdit_age, SIGNAL(textModified()), this, SLOT(updateAge())); connect( lineEdit_ageTemp, SIGNAL(textModified()), this, SLOT(updateAgeTemp())); connect( lineEdit_asstBrewer, SIGNAL(textModified()), this, SLOT(updateBrewerAsst()) ); connect( lineEdit_brewer, SIGNAL(textModified()), this, SLOT(updateBrewer()) ); connect( lineEdit_carbVols, SIGNAL(textModified()), this, SLOT(updateCarbonation()) ); connect( lineEdit_primaryAge, SIGNAL(textModified()), this, SLOT(updatePrimaryAge()) ); connect( lineEdit_primaryTemp,SIGNAL(textModified()), this, SLOT(updatePrimaryTemp()) ); connect( lineEdit_secAge, SIGNAL(textModified()), this, SLOT(updateSecondaryAge()) ); connect( lineEdit_secTemp, SIGNAL(textModified()), this, SLOT(updateSecondaryTemp()) ); connect( lineEdit_tertAge, SIGNAL(textModified()), this, SLOT(updateTertiaryAge()) ); connect( lineEdit_tertTemp, SIGNAL(textModified()), this, SLOT(updateTertiaryTemp()) ); connect( spinBox_tasteRating, SIGNAL(valueChanged(int)), this, SLOT(changeRatings(int)) ); connect( spinBox_tasteRating, SIGNAL(editingFinished()), this, SLOT(updateTasteRating()) ); connect( dateEdit_date, SIGNAL(dateChanged(const QDate& )), this, SLOT(updateDate(const QDate&)) ); connect(btTextEdit_notes, SIGNAL(textModified()), this, SLOT(updateNotes())); connect(btTextEdit_tasteNotes, SIGNAL(textModified()), this, SLOT(updateTasteNotes())); }
// ----------- udpate void Plant::update(){ rig.update(); updatePolylines(); updateAnimators(); updateMesh(); updateAge(); }
void RecipeExtrasWidget::saveAll() { //recObs->disableNotification(); updateBrewer(); updateBrewerAsst(); updateTasteRating(); updatePrimaryAge(); updatePrimaryTemp(); updateSecondaryAge(); updateSecondaryTemp(); updateTertiaryAge(); updateTertiaryTemp(); updateAge(); updateAgeTemp(); updateDate(); updateCarbonation(); updateTasteNotes(); updateNotes(); //recObs->reenableNotification(); //recObs->forceNotify(); hide(); }
void User::setAge(int age) { if(myAge != age) { myAge = age; updateAge(age); calculateBMR(); emit ageChanged(); } }
//PAGEBREAK: 41 void trap(struct trapframe *tf) { if(tf->trapno == T_SYSCALL){ if(proc->killed) exit(); proc->tf = tf; syscall(); if(proc->killed) exit(); return; } switch(tf->trapno){ case T_IRQ0 + IRQ_TIMER: if(cpu->id == 0){ acquire(&tickslock); ticks++; wakeup(&ticks); release(&tickslock); } lapiceoi(); break; case T_IRQ0 + IRQ_IDE: ideintr(); lapiceoi(); break; case T_IRQ0 + IRQ_IDE+1: // Bochs generates spurious IDE1 interrupts. break; case T_IRQ0 + IRQ_KBD: kbdintr(); lapiceoi(); break; case T_IRQ0 + IRQ_COM1: uartintr(); lapiceoi(); break; case T_IRQ0 + 7: case T_IRQ0 + IRQ_SPURIOUS: cprintf("cpu%d: spurious interrupt at %x:%x\n", cpu->id, tf->cs, tf->eip); lapiceoi(); break; //page fault //int i; case T_PGFLT: proc->pageFaultCounter++; cprintf("page fault! pid %d va: %x between: %x and: %x\n",proc->pid,rcr2(),PGROUNDDOWN(rcr2()),PGROUNDUP(rcr2())); // for(i = 0; i < 30; i++){ // if(proc->pagesMetaData[i].va != (char *) -1) // cprintf("%d %x %d\n",i,proc->pagesMetaData[i].va,proc->pagesMetaData[i].isPhysical); // } //va = p2v(rcr2()); if(existOnDisc(rcr2())){ cprintf("found on disk, recovering\n"); fixPage(rcr2()); cprintf("recovered!\n"); break; } //PAGEBREAK: 13 default: if(proc == 0 || (tf->cs&3) == 0){ // In kernel, it must be our mistake. cprintf("unexpected trap %d from cpu %d eip %x (cr2=0x%x)\n", tf->trapno, cpu->id, tf->eip, rcr2()); panic("trap"); } // In user space, assume process misbehaved. cprintf("pid %d %s: trap %d err %d on cpu %d " "eip 0x%x addr 0x%x--kill proc\n", proc->pid, proc->name, tf->trapno, tf->err, cpu->id, tf->eip, rcr2()); proc->killed = 1; } // Force process exit if it has been killed and is in user space. // (If it is still executing in the kernel, let it keep running // until it gets to the regular system call return.) if(proc && proc->killed && (tf->cs&3) == DPL_USER) exit(); // Force process to give up CPU on clock tick. // If interrupts were on while locks held, would need to check nlock. if(proc && proc->state == RUNNING && tf->trapno == T_IRQ0+IRQ_TIMER){ //update age of pages.TODO:check it is the right place. if (SCHEDFLAG==4){ updateAge(proc); } yield(); } // Check if the process has been killed since we yielded if(proc && proc->killed && (tf->cs&3) == DPL_USER) exit(); }
void ColorNode::setCenter(BWAPI::Position regionCenter) { center = BWAPI::Position(regionCenter.x(), regionCenter.y()); updateAge(); }
void ColorNode::addNeighbor(int neighborId) { neighbors.push_back(neighborId); updateAge(); }
void ColorNode::setColor(NodeColor nodeColor) { color = nodeColor; updateAge(); }