|
|
|
@ -207,11 +207,6 @@ void HardwareInfo::processKeyPressEvent(unsigned int keycode, TDEEventDevice* ed
|
|
|
|
|
} else if (((edevice->eventType() == TDEEventDeviceType::ACPISuspendButton) || (edevice->eventType() == TDEEventDeviceType::ACPIOtherInput))
|
|
|
|
|
&& (keycode == KEY_SUSPEND)) {
|
|
|
|
|
TQTimer::singleShot(50, this, TQT_SLOT(emitS2diskButtonPressed()));
|
|
|
|
|
// } else if (value.startsWith("brightness-")) {
|
|
|
|
|
// if (!brightness_in_hardware && value.endsWith("-up"))
|
|
|
|
|
// TQTimer::singleShot(50, this, TQT_SLOT(brightnessUpPressed()));
|
|
|
|
|
// else if (!brightness_in_hardware && value.endsWith("-down"))
|
|
|
|
|
// TQTimer::singleShot(50, this, TQT_SLOT(brightnessDownPressed()));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
kdDebugFuncOut(trace);
|
|
|
|
@ -1220,45 +1215,6 @@ bool HardwareInfo::setBrightnessDown(int percentageStep) {
|
|
|
|
|
return retval;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
|
* Function to handle the signal for the brightness up button/key
|
|
|
|
|
*/
|
|
|
|
|
void HardwareInfo::brightnessUpPressed() {
|
|
|
|
|
kdDebugFuncIn(trace);
|
|
|
|
|
|
|
|
|
|
if (brightness) {
|
|
|
|
|
if (!sessionIsActive) {
|
|
|
|
|
kdWarning() << "Session is not active, don't react on brightness up key event!" << endl;
|
|
|
|
|
} else {
|
|
|
|
|
if (currentBrightnessLevel < availableBrightnessLevels) {
|
|
|
|
|
setBrightnessUp();
|
|
|
|
|
} else {
|
|
|
|
|
kdWarning() << "Could not set brightness to higher level, it's already set to max." << endl;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
kdDebugFuncOut(trace);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
|
* Function to handle the signal for the brightness down button/key
|
|
|
|
|
*/
|
|
|
|
|
void HardwareInfo::brightnessDownPressed() {
|
|
|
|
|
kdDebugFuncIn(trace);
|
|
|
|
|
|
|
|
|
|
if (brightness) {
|
|
|
|
|
if (!sessionIsActive) {
|
|
|
|
|
kdWarning() << "Session is not active, don't react on brightness down key event!" << endl;
|
|
|
|
|
} else {
|
|
|
|
|
if (currentBrightnessLevel > 0) {
|
|
|
|
|
setBrightnessDown();
|
|
|
|
|
} else {
|
|
|
|
|
kdWarning() << "Could not set brightness to lower level, it's already set to min." << endl;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// --> private helper slots to forward/handle events -- END <--
|
|
|
|
|
|
|
|
|
|
// --> get private members section -- START <---
|
|
|
|
|