double fields_chunk::peek_field(component c, const vec &where) { double w[8]; ivec ilocs[8]; gv.interpolate(c,where, ilocs, w); if (gv.contains(ilocs[0]) && f[c][0]) { double hello = 0.0; if (is_mine()) hello = f[c][0][gv.index(c,ilocs[0])]; broadcast(n_proc(), &hello, 1); return hello; } //abort("Got no such %s field at %g %g!\n", // component_name(c), gv[ilocs[0]].x(), gv[ilocs[0]].y()); return 0.0; }
void msg_proc(struct msg_head_t *msg, int len, int proto) { if(!is_mine(msg)) return; switch(msg->msg_type) { case MSG_AC_BRD: proc_brd((void *)msg, len, proto); break; case MSG_AC_REG_RESP: proc_reg_resp((void *)msg, len, proto); break; case MSG_AC_CMD: __exec_cmd((struct msg_ac_cmd_t *)msg); break; default: break; } }
void Case::mouseReleaseEvent(QMouseEvent *event) { if(left_click ==true && right_click == false) { hidden = false; if(!flag) { if(etat == 0) emit is_empty(num); else if(etat == 9) emit is_mine(num); } } else if(left_click ==false && right_click == true) { if(hidden == false && flag == false) return; if(flag) { flag = false; hidden = true; emit deflag_mine(); } else { flag = true; hidden = false; emit flag_mine(); } } else if(left_click ==true && right_click == true) emit is_double_clicked(num); left_click = false; right_click = false; emit need_update(); }