data = 0x2; //red
}
else if((Keyevent->key() == Qt::Key_G) ||
(Keyevent->key() == Qt::Key_H) ||
(Keyevent->key() == Qt::Key_I) ){
data = 0x4; //all
}
else if((Keyevent->key() == Qt::Key_J)){
BUZ_Set(BUZZ_ON);
usleep(1000);
}
}
else if (event->type() == QEvent::KeyRelease){
data = 0x0;
LED_Set(sel,data);
usleep(1000);
BUZ_Set(BUZZ_OFF);
usleep(1000);
}
switch(Keyevent->key()){
case Qt::Key_A:
case Qt::Key_D:
case Qt::Key_G:
sel = RIGHT_LED1;
break;
case Qt::Key_B:
case Qt::Key_E:
case Qt::Key_H:
sel = RIGHT_LED2;
break;
case Qt::Key_C:
case Qt::Key_F:
case Qt::Key_I:
sel = RIGHT_LED3;
break;
default:
break;
}
LED_Set(sel,data);
return QObject::eventFilter(object,event);
}