void QToggleSwitch::toggle() { extern int currentValue; if (this->value() == 1) { this->setSliderPosition(0); currentValue = 0; this->setValue(0); emit toggled(); emit switchedOff(); } else { this->setSliderPosition(1); currentValue = 1; this->setValue(1); emit toggled(); emit switchedOn(); } }
void Light::processOff() { emit switchedOff(); }