void RDTransportButton::setState(RDTransportButton::TransState state) { QKeySequence a=accel(); button_state=state; switch(button_state) { case RDTransportButton::On: flashOff(); if(isEnabled()) { setPixmap(*on_cap); } break; case RDTransportButton::Off: flashOff(); if(isEnabled()) { setPixmap(*off_cap); } break; case RDTransportButton::Flashing: if(isEnabled()) { flashOn(); } break; } setAccel(a); }
void RDPushButton::setFlashingEnabled(bool state) { flashing_enabled=state; if(flashing_enabled) { flashOn(); } else { flashOff(); } }