@ -41,18 +41,18 @@
# include <tqtooltip.h>
# include <tqtooltip.h>
// own headers:
// own headers:
# include " k powersave.h"
# include " tde powersave.h"
# include "infodialog.h"
# include "infodialog.h"
/*!
/*!
* \ file k powersave. cpp
* \ file tde powersave. cpp
* \ brief This file contains the main functionality of the k powersave- applet . */
* \ brief This file contains the main functionality of the tde powersave- applet . */
/*!
/*!
* This is the default constructor of the class k powersave.
* This is the default constructor of the class tde powersave.
*/
*/
kpowersave: : k powersave( bool force_acpi_check , bool trace_func ) : KSystemTray ( 0 , " k powersave" ) ,
tdepowersave: : tde powersave( bool force_acpi_check , bool trace_func ) : KSystemTray ( 0 , " tde powersave" ) ,
DCOPObject ( " KP owersaveIface" ) {
DCOPObject ( " tdep owersaveIface" ) {
trace = trace_func ;
trace = trace_func ;
kdDebugFuncIn ( trace ) ;
kdDebugFuncIn ( trace ) ;
@ -72,13 +72,13 @@ kpowersave::kpowersave( bool force_acpi_check, bool trace_func ) : KSystemTray(0
if ( ! config - > readBoolEntry ( " AlreadyStarted " , false ) | | force_acpi_check ) {
if ( ! config - > readBoolEntry ( " AlreadyStarted " , false ) | | force_acpi_check ) {
config - > writeEntry ( " AlreadyStarted " , true ) ;
config - > writeEntry ( " AlreadyStarted " , true ) ;
// check whether APM, ACPI, PMU, CPUFreq or Suspend2Disk/ram supported, otherwise end up
// check whether APM, ACPI, PMU, CPUFreq or Suspend2Disk/ram supported, otherwise end up
// and don't start k powersave ever again until force_acpi_check == true.
// and don't start tde powersave ever again until force_acpi_check == true.
if ( ! hwinfo - > hasACPI ( ) & & ! hwinfo - > hasAPM ( ) & & ! hwinfo - > hasPMU ( ) & &
if ( ! hwinfo - > hasACPI ( ) & & ! hwinfo - > hasAPM ( ) & & ! hwinfo - > hasPMU ( ) & &
! hwinfo - > supportCPUFreq ( ) & & ! suspend . suspend2disk & & ! suspend . suspend2ram ) {
! hwinfo - > supportCPUFreq ( ) & & ! suspend . suspend2disk & & ! suspend . suspend2ram ) {
config - > writeEntry ( " Autostart " , false ) ;
config - > writeEntry ( " Autostart " , false ) ;
config - > sync ( ) ;
config - > sync ( ) ;
kdError ( ) < < " This machine does not support ACPI, APM, PMU, CPUFreq, Suspend2Disk nor "
kdError ( ) < < " This machine does not support ACPI, APM, PMU, CPUFreq, Suspend2Disk nor "
< < " Suspend2RAM. Please close KP owersave now." < < endl ;
< < " Suspend2RAM. Please close tdep owersave now." < < endl ;
exit ( - 1 ) ;
exit ( - 1 ) ;
}
}
}
}
@ -142,8 +142,8 @@ kpowersave::kpowersave( bool force_acpi_check, bool trace_func ) : KSystemTray(0
}
}
/*! This is the default destructor of class k powersave. */
/*! This is the default destructor of class tde powersave. */
kpowersave: : ~ k powersave( ) {
tdepowersave: : ~ tde powersave( ) {
kdDebugFuncIn ( trace ) ;
kdDebugFuncIn ( trace ) ;
delete hwinfo ;
delete hwinfo ;
@ -158,11 +158,11 @@ kpowersave::~kpowersave(){
/*!
/*!
* use this function to initalise the main kicker menu
* use this function to initalise the main kicker menu
*/
*/
void k powersave: : initMenu ( ) {
void tde powersave: : initMenu ( ) {
kdDebugFuncIn ( trace ) ;
kdDebugFuncIn ( trace ) ;
CONFIGURE_ID = this - > contextMenu ( ) - > insertItem ( SmallIcon ( " configure " , TQIconSet : : Automatic ) ,
CONFIGURE_ID = this - > contextMenu ( ) - > insertItem ( SmallIcon ( " configure " , TQIconSet : : Automatic ) ,
i18n ( " Configure K Powersave..." ) ,
i18n ( " Configure TDE Powersave..." ) ,
this , TQT_SLOT ( showConfigureDialog ( ) ) ) ;
this , TQT_SLOT ( showConfigureDialog ( ) ) ) ;
CONFIGURE_EVENTS_ID = this - > contextMenu ( ) - > insertItem ( SmallIcon ( " knotify " , TQIconSet : : Automatic ) ,
CONFIGURE_EVENTS_ID = this - > contextMenu ( ) - > insertItem ( SmallIcon ( " knotify " , TQIconSet : : Automatic ) ,
i18n ( " Configure Notifications... " ) ,
i18n ( " Configure Notifications... " ) ,
@ -215,12 +215,12 @@ void kpowersave::initMenu() {
help_menu = new TQPopupMenu ( this , i18n ( " &Help " ) . ascii ( ) ) ;
help_menu = new TQPopupMenu ( this , i18n ( " &Help " ) . ascii ( ) ) ;
help_menu - > insertItem ( SmallIcon ( " help " , TQIconSet : : Automatic ) , i18n ( " & KP owersave Handbook" ) ,
help_menu - > insertItem ( SmallIcon ( " help " , TQIconSet : : Automatic ) , i18n ( " & tdep owersave Handbook" ) ,
this , TQT_SLOT ( slotHelp ( ) ) ) ;
this , TQT_SLOT ( slotHelp ( ) ) ) ;
help_menu - > insertSeparator ( ) ;
help_menu - > insertSeparator ( ) ;
help_menu - > insertItem ( i18n ( " &Report a bug ... " ) , this , TQT_SLOT ( slotReportBug ( ) ) ) ;
help_menu - > insertItem ( i18n ( " &Report a bug ... " ) , this , TQT_SLOT ( slotReportBug ( ) ) ) ;
help_menu - > insertItem ( SmallIcon ( " k powersave" , TQIconSet : : Automatic ) ,
help_menu - > insertItem ( SmallIcon ( " tde powersave" , TQIconSet : : Automatic ) ,
i18n ( " &About KP owersave" ) , this , TQT_SLOT ( slotAbout ( ) ) ) ;
i18n ( " &About tdep owersave" ) , this , TQT_SLOT ( slotAbout ( ) ) ) ;
HELP_MENU = contextMenu ( ) - > insertItem ( SmallIcon ( " help " , TQIconSet : : Automatic ) ,
HELP_MENU = contextMenu ( ) - > insertItem ( SmallIcon ( " help " , TQIconSet : : Automatic ) ,
i18n ( " &Help " ) , help_menu ) ;
i18n ( " &Help " ) , help_menu ) ;
@ -230,7 +230,7 @@ void kpowersave::initMenu() {
kdDebugFuncOut ( trace ) ;
kdDebugFuncOut ( trace ) ;
}
}
void k powersave: : resizeEvent ( TQResizeEvent * )
void tde powersave: : resizeEvent ( TQResizeEvent * )
{
{
// Honor Free Desktop specifications that allow for arbitrary system tray icon sizes
// Honor Free Desktop specifications that allow for arbitrary system tray icon sizes
loadIcon ( true ) ;
loadIcon ( true ) ;
@ -241,7 +241,7 @@ void kpowersave::resizeEvent ( TQResizeEvent * )
* This funtion load and manipulate the icons for the kickerapplet - section .
* This funtion load and manipulate the icons for the kickerapplet - section .
* The redraw interval depends on \ ref icon_set_colored and \ ref BAT_icon_BG_intervall .
* The redraw interval depends on \ ref icon_set_colored and \ ref BAT_icon_BG_intervall .
*/
*/
void k powersave: : redrawPixmap ( ) {
void tde powersave: : redrawPixmap ( ) {
kdDebugFuncIn ( trace ) ;
kdDebugFuncIn ( trace ) ;
// if colored icon_background: normal redraw intervall is set off.
// if colored icon_background: normal redraw intervall is set off.
@ -261,9 +261,9 @@ void kpowersave::redrawPixmap(){
}
}
/*!
/*!
* Starts the configure dialog of k powersave.
* Starts the configure dialog of tde powersave.
*/
*/
void k powersave: : showConfigureDialog ( ) {
void tde powersave: : showConfigureDialog ( ) {
kdDebugFuncIn ( trace ) ;
kdDebugFuncIn ( trace ) ;
if ( ! config_dialog_shown ) {
if ( ! config_dialog_shown ) {
@ -289,9 +289,9 @@ void kpowersave::showConfigureDialog() {
}
}
/*!
/*!
* Starts the notification configure dialog of k powersave.
* Starts the notification configure dialog of tde powersave.
*/
*/
void k powersave: : showConfigureNotificationsDialog ( ) {
void tde powersave: : showConfigureNotificationsDialog ( ) {
kdDebugFuncIn ( trace ) ;
kdDebugFuncIn ( trace ) ;
KNotifyDialog : : configure ( this ) ;
KNotifyDialog : : configure ( this ) ;
@ -304,7 +304,7 @@ void kpowersave::showConfigureNotificationsDialog() {
* To reduce the systemload the icons are only reloaded if \ ref pixmap_name
* To reduce the systemload the icons are only reloaded if \ ref pixmap_name
* is changed .
* is changed .
*/
*/
void k powersave: : loadIcon ( bool forceReload ) {
void tde powersave: : loadIcon ( bool forceReload ) {
kdDebugFuncIn ( trace ) ;
kdDebugFuncIn ( trace ) ;
TQString pixmap_name_tmp = " NONE " ;
TQString pixmap_name_tmp = " NONE " ;
@ -371,7 +371,7 @@ void kpowersave::loadIcon(bool forceReload){
* the same and white pixel only in the rectangle of the icon , the white pixel
* the same and white pixel only in the rectangle of the icon , the white pixel
* stored in \ ref countWhiteIconPixel only one time .
* stored in \ ref countWhiteIconPixel only one time .
*/
*/
void k powersave: : drawIcon ( ) {
void tde powersave: : drawIcon ( ) {
kdDebugFuncIn ( trace ) ;
kdDebugFuncIn ( trace ) ;
BatteryCollection * primary = hwinfo - > getPrimaryBatteries ( ) ;
BatteryCollection * primary = hwinfo - > getPrimaryBatteries ( ) ;
@ -443,7 +443,7 @@ quit:
* should implement this . \ n If it is possible we should update the tooltip permanently
* should implement this . \ n If it is possible we should update the tooltip permanently
* while the mouse cursor is over the widget
* while the mouse cursor is over the widget
*/
*/
void k powersave: : updateTooltip ( ) {
void tde powersave: : updateTooltip ( ) {
kdDebugFuncIn ( trace ) ;
kdDebugFuncIn ( trace ) ;
BatteryCollection * primary = hwinfo - > getPrimaryBatteries ( ) ;
BatteryCollection * primary = hwinfo - > getPrimaryBatteries ( ) ;
@ -506,7 +506,7 @@ void kpowersave::updateTooltip(){
* with ID \ ref YAST_MODULE_MENU_ID , named " Start YaST2 Power Management Module " .
* with ID \ ref YAST_MODULE_MENU_ID , named " Start YaST2 Power Management Module " .
* It create a new TDEProcess and execute " /sbin/yast2 power-management " with tdesu .
* It create a new TDEProcess and execute " /sbin/yast2 power-management " with tdesu .
*/
*/
void k powersave: : do_config ( ) {
void tde powersave: : do_config ( ) {
kdDebugFuncIn ( trace ) ;
kdDebugFuncIn ( trace ) ;
# ifdef ENABLE_YAST_ENTRY
# ifdef ENABLE_YAST_ENTRY
@ -531,17 +531,17 @@ void kpowersave::do_config(){
}
}
/*!
/*!
* \ b TQT_SLOT to open the KP owersave help
* \ b TQT_SLOT to open the tdep owersave help
*/
*/
void k powersave: : slotHelp ( )
void tde powersave: : slotHelp ( )
{
{
kapp - > invokeHelp ( " " , " k powersave" ) ;
kapp - > invokeHelp ( " " , " tde powersave" ) ;
}
}
/*!
/*!
* \ b TQT_SLOT to open the KP owersave About dialog
* \ b TQT_SLOT to open the tdep owersave About dialog
*/
*/
void k powersave: : slotAbout ( )
void tde powersave: : slotAbout ( )
{
{
TDEAboutApplication a ( this ) ;
TDEAboutApplication a ( this ) ;
a . exec ( ) ;
a . exec ( ) ;
@ -550,7 +550,7 @@ void kpowersave::slotAbout()
/*!
/*!
* \ b TQT_SLOT to open the website to report bugs
* \ b TQT_SLOT to open the website to report bugs
*/
*/
void k powersave: : slotReportBug ( )
void tde powersave: : slotReportBug ( )
{
{
# ifdef DISTRO_IS_SUSE
# ifdef DISTRO_IS_SUSE
# ifdef DISTRO_IS_SLES_SLED
# ifdef DISTRO_IS_SLES_SLED
@ -582,7 +582,7 @@ void kpowersave::slotReportBug()
* The slot called by the TQTimer \ ref BAT_WARN_ICON_Timer . The interval of the timer is defined
* The slot called by the TQTimer \ ref BAT_WARN_ICON_Timer . The interval of the timer is defined
* trough \ ref BAT_icon_BG_intervall and starts here : \ ref loadIcon ( ) .
* trough \ ref BAT_icon_BG_intervall and starts here : \ ref loadIcon ( ) .
*/
*/
void k powersave: : do_setIconBG ( ) {
void tde powersave: : do_setIconBG ( ) {
kdDebugFuncIn ( trace ) ;
kdDebugFuncIn ( trace ) ;
if ( icon_set_colored ) icon_state_changed = true ;
if ( icon_set_colored ) icon_state_changed = true ;
@ -593,7 +593,7 @@ void kpowersave::do_setIconBG(){
/*!
/*!
* \ b TQT_SLOT to enable / disable the autosuspend .
* \ b TQT_SLOT to enable / disable the autosuspend .
*/
*/
void k powersave: : do_setAutosuspend ( ) {
void tde powersave: : do_setAutosuspend ( ) {
kdDebugFuncIn ( trace ) ;
kdDebugFuncIn ( trace ) ;
if ( ! contextMenu ( ) - > isItemChecked ( AUTOSUSPEND_MENU_ID ) ) {
if ( ! contextMenu ( ) - > isItemChecked ( AUTOSUSPEND_MENU_ID ) ) {
@ -620,7 +620,7 @@ void kpowersave::do_setAutosuspend(){
* \ ref config_dialog_shown to false .
* \ ref config_dialog_shown to false .
* TODO : check if we maybe should force here the current default scheme depending on the AC / battery state
* TODO : check if we maybe should force here the current default scheme depending on the AC / battery state
*/
*/
void k powersave: : observeConfigDlg ( ) {
void tde powersave: : observeConfigDlg ( ) {
kdDebugFuncIn ( trace ) ;
kdDebugFuncIn ( trace ) ;
// reload general settings
// reload general settings
@ -645,7 +645,7 @@ void kpowersave::observeConfigDlg(){
* \ b TQT_SLOT which called from \ ref do_config ( ) if the ' tdesu yast2 ' TDEProcess exited .
* \ b TQT_SLOT which called from \ ref do_config ( ) if the ' tdesu yast2 ' TDEProcess exited .
* This function control the return value and display if needed a errormessage on failure .
* This function control the return value and display if needed a errormessage on failure .
*/
*/
void k powersave: : slotConfigProcessExited ( TDEProcess * proc ) {
void tde powersave: : slotConfigProcessExited ( TDEProcess * proc ) {
kdDebugFuncIn ( trace ) ;
kdDebugFuncIn ( trace ) ;
# ifdef ENABLE_YAST_ENTRY
# ifdef ENABLE_YAST_ENTRY
@ -680,7 +680,7 @@ void kpowersave::slotConfigProcessExited(TDEProcess *proc){
* \ retval true if successful
* \ retval true if successful
* \ retval false if command not supported or if powersaved not running
* \ retval false if command not supported or if powersaved not running
*/
*/
bool k powersave: : do_suspend2disk ( ) {
bool tde powersave: : do_suspend2disk ( ) {
kdDebugFuncIn ( trace ) ;
kdDebugFuncIn ( trace ) ;
if ( suspend . suspend2disk ) {
if ( suspend . suspend2disk ) {
@ -736,7 +736,7 @@ bool kpowersave::do_suspend2disk(){
* \ retval true if successful
* \ retval true if successful
* \ retval false if command not supported or if powersaved not running
* \ retval false if command not supported or if powersaved not running
*/
*/
bool k powersave: : do_suspend2ram ( ) {
bool tde powersave: : do_suspend2ram ( ) {
kdDebugFuncIn ( trace ) ;
kdDebugFuncIn ( trace ) ;
if ( suspend . suspend2ram ) {
if ( suspend . suspend2ram ) {
@ -792,7 +792,7 @@ bool kpowersave::do_suspend2ram(){
* \ retval true if successful
* \ retval true if successful
* \ retval false if command not supported or if powersaved not running
* \ retval false if command not supported or if powersaved not running
*/
*/
bool k powersave: : do_standby ( ) {
bool tde powersave: : do_standby ( ) {
kdDebugFuncIn ( trace ) ;
kdDebugFuncIn ( trace ) ;
if ( suspend . standby ) {
if ( suspend . standby ) {
@ -844,7 +844,7 @@ bool kpowersave::do_standby(){
* the dialog if needed or call directly autosuspend after the signal
* the dialog if needed or call directly autosuspend after the signal
* \ ref autosuspend : : inactivityTimeExpired was recieved .
* \ ref autosuspend : : inactivityTimeExpired was recieved .
*/
*/
void k powersave: : do_autosuspendWarn ( ) {
void tde powersave: : do_autosuspendWarn ( ) {
kdDebugFuncIn ( trace ) ;
kdDebugFuncIn ( trace ) ;
if ( settings - > autoSuspendCountdown & & ( settings - > autoSuspendCountdownTimeout > 0 ) ) {
if ( settings - > autoSuspendCountdown & & ( settings - > autoSuspendCountdownTimeout > 0 ) ) {
@ -861,7 +861,7 @@ void kpowersave::do_autosuspendWarn() {
} else if ( settings - > autoInactiveAction = = " Standby " ) {
} else if ( settings - > autoInactiveAction = = " Standby " ) {
countdown - > setPixmap ( " standby " ) ;
countdown - > setPixmap ( " standby " ) ;
} else {
} else {
countdown - > setPixmap ( " k powersave" ) ;
countdown - > setPixmap ( " tde powersave" ) ;
}
}
// TODO: rework this after translation round for openSUSE 10.3 !
// TODO: rework this after translation round for openSUSE 10.3 !
@ -891,7 +891,7 @@ void kpowersave::do_autosuspendWarn() {
* \ todo add check if the requested command is supported befor send and
* \ todo add check if the requested command is supported befor send and
* add message for this case to tell that maybe changed config !
* add message for this case to tell that maybe changed config !
*/
*/
bool k powersave: : do_autosuspend ( bool chancel ) {
bool tde powersave: : do_autosuspend ( bool chancel ) {
kdDebugFuncIn ( trace ) ;
kdDebugFuncIn ( trace ) ;
// TODO: check if this is really needed, it get called also on the suspend methodes
// TODO: check if this is really needed, it get called also on the suspend methodes
@ -931,7 +931,7 @@ bool kpowersave::do_autosuspend(bool chancel) {
* \ retval true if successful
* \ retval true if successful
* \ retval false else
* \ retval false else
*/
*/
void k powersave: : do_downDimm ( ) {
void tde powersave: : do_downDimm ( ) {
kdDebugFuncIn ( trace ) ;
kdDebugFuncIn ( trace ) ;
if ( hwinfo - > supportBrightness ( ) ) {
if ( hwinfo - > supportBrightness ( ) ) {
@ -968,7 +968,7 @@ void kpowersave::do_downDimm() {
* \ retval true if successful
* \ retval true if successful
* \ retval false else
* \ retval false else
*/
*/
void k powersave: : do_upDimm ( ) {
void tde powersave: : do_upDimm ( ) {
kdDebugFuncIn ( trace ) ;
kdDebugFuncIn ( trace ) ;
//NOTE we go back to the value of the scheme and not the last on, to reduce trouble with the scheme
//NOTE we go back to the value of the scheme and not the last on, to reduce trouble with the scheme
@ -1009,7 +1009,7 @@ void kpowersave::do_upDimm() {
* \ retval true if successful
* \ retval true if successful
* \ retval false else
* \ retval false else
*/
*/
void k powersave: : do_dimm ( ) {
void tde powersave: : do_dimm ( ) {
kdDebugFuncIn ( trace ) ;
kdDebugFuncIn ( trace ) ;
int current = hwinfo - > getCurrentBrightnessLevel ( ) ;
int current = hwinfo - > getCurrentBrightnessLevel ( ) ;
@ -1047,7 +1047,7 @@ void kpowersave::do_dimm() {
* \ retval true if all was successful
* \ retval true if all was successful
* \ retval false if not
* \ retval false if not
*/
*/
bool k powersave: : handleMounts ( bool suspend ) {
bool tde powersave: : handleMounts ( bool suspend ) {
if ( trace ) kdDebug ( ) < < funcinfo < < " IN: " < < " called suspend: " < < suspend < < endl ;
if ( trace ) kdDebug ( ) < < funcinfo < < " IN: " < < " called suspend: " < < suspend < < endl ;
bool _ret = false ;
bool _ret = false ;
@ -1120,7 +1120,7 @@ bool kpowersave::handleMounts( bool suspend ) {
/*!
/*!
* Handle the event for the power button and call the related action .
* Handle the event for the power button and call the related action .
*/
*/
void k powersave: : handlePowerButtonEvent ( ) {
void tde powersave: : handlePowerButtonEvent ( ) {
kdDebugFuncIn ( trace ) ;
kdDebugFuncIn ( trace ) ;
/* Only go to suspend on button event if we already resumed successful.
/* Only go to suspend on button event if we already resumed successful.
@ -1136,7 +1136,7 @@ void kpowersave::handlePowerButtonEvent( ) {
/*!
/*!
* Handle the event for the suspend2ram / sleep button and call the related action .
* Handle the event for the suspend2ram / sleep button and call the related action .
*/
*/
void k powersave: : handleSleepButtonEvent ( ) {
void tde powersave: : handleSleepButtonEvent ( ) {
kdDebugFuncIn ( trace ) ;
kdDebugFuncIn ( trace ) ;
// Only go to suspend on button event if we already resumed successful.
// Only go to suspend on button event if we already resumed successful.
@ -1150,7 +1150,7 @@ void kpowersave::handleSleepButtonEvent() {
/*!
/*!
* Handle the event for the suspend2disk ( hibernater ) button and call the related action .
* Handle the event for the suspend2disk ( hibernater ) button and call the related action .
*/
*/
void k powersave: : handleS2DiskButtonEvent ( ) {
void tde powersave: : handleS2DiskButtonEvent ( ) {
kdDebugFuncIn ( trace ) ;
kdDebugFuncIn ( trace ) ;
// Only go to suspend on button event if we already resumed successful.
// Only go to suspend on button event if we already resumed successful.
@ -1166,7 +1166,7 @@ void kpowersave::handleS2DiskButtonEvent(){
* depends on the user specific settings .
* depends on the user specific settings .
* \ param closed boolean with info if the lid is closed or not
* \ param closed boolean with info if the lid is closed or not
*/
*/
void k powersave: : handleLidEvent ( bool closed ) {
void tde powersave: : handleLidEvent ( bool closed ) {
if ( trace ) kdDebug ( ) < < funcinfo < < " IN: " < < " Lid closed? " < < closed < < endl ;
if ( trace ) kdDebug ( ) < < funcinfo < < " IN: " < < " Lid closed? " < < closed < < endl ;
if ( closed ) {
if ( closed ) {
@ -1222,7 +1222,7 @@ void kpowersave::handleLidEvent( bool closed ){
/*!
/*!
* \ b TQT_SLOT to show the login dialog if the desktop was locked before the suspend .
* \ b TQT_SLOT to show the login dialog if the desktop was locked before the suspend .
*/
*/
void k powersave: : activateLoginScreen ( ) {
void tde powersave: : activateLoginScreen ( ) {
kdDebugFuncIn ( trace ) ;
kdDebugFuncIn ( trace ) ;
// get new general settings! This could maybe removed if we
// get new general settings! This could maybe removed if we
@ -1239,7 +1239,7 @@ void kpowersave::activateLoginScreen(){
/*!
/*!
* \ b TQT_SLOT to set the current suspend type for later use .
* \ b TQT_SLOT to set the current suspend type for later use .
*/
*/
void k powersave: : setSuspendType ( TQString suspendtype ) {
void tde powersave: : setSuspendType ( TQString suspendtype ) {
kdDebugFuncIn ( trace ) ;
kdDebugFuncIn ( trace ) ;
suspendType = suspendtype ;
suspendType = suspendtype ;
@ -1248,11 +1248,11 @@ void kpowersave::setSuspendType( TQString suspendtype){
}
}
/*!
/*!
* \ b TQT_SLOT which called if k powersave is exited by the user . In this case the user
* \ b TQT_SLOT which called if tde powersave is exited by the user . In this case the user
* is asked through a yes / no box if " KP owersave start automatically on log in" and the
* is asked through a yes / no box if " tdep owersave start automatically on log in" and the
* result is written to the KDE configfile .
* result is written to the KDE configfile .
*/
*/
void k powersave: : _quit ( ) {
void tde powersave: : _quit ( ) {
kdDebugFuncIn ( trace ) ;
kdDebugFuncIn ( trace ) ;
// set the KDE-Settings back to user default
// set the KDE-Settings back to user default
@ -1281,7 +1281,7 @@ void kpowersave::_quit (){
}
}
if ( ! settings - > autostartNeverAsk ) {
if ( ! settings - > autostartNeverAsk ) {
TQString tmp1 = i18n ( " Start KP owersave automatically when you log in?" ) ;
TQString tmp1 = i18n ( " Start tdep owersave automatically when you log in?" ) ;
int tmp2 = KMessageBox : : questionYesNo ( 0 , tmp1 , i18n ( " Question " ) ,
int tmp2 = KMessageBox : : questionYesNo ( 0 , tmp1 , i18n ( " Question " ) ,
i18n ( " Start Automatically " ) , i18n ( " Do Not Start " ) ) ;
i18n ( " Start Automatically " ) , i18n ( " Do Not Start " ) ) ;
config - > setGroup ( " General " ) ;
config - > setGroup ( " General " ) ;
@ -1295,7 +1295,7 @@ void kpowersave::_quit (){
/*!
/*!
* \ b TQT_SLOT called if the user select a ' CPU Frequency Policy ' from the menu ( \ ref CPUFRETQ_MENU_ID ) .
* \ b TQT_SLOT called if the user select a ' CPU Frequency Policy ' from the menu ( \ ref CPUFRETQ_MENU_ID ) .
*/
*/
void k powersave: : do_setSpeedPolicy ( int menu_id ) {
void tde powersave: : do_setSpeedPolicy ( int menu_id ) {
if ( trace ) kdDebug ( ) < < funcinfo < < " IN: " < < " menu_id/set policy to: " < < menu_id < < endl ;
if ( trace ) kdDebug ( ) < < funcinfo < < " IN: " < < " menu_id/set policy to: " < < menu_id < < endl ;
if ( ! hwinfo - > setCPUFreq ( ( cpufreq_type ) menu_id , settings - > cpuFreqDynamicPerformance ) ) {
if ( ! hwinfo - > setCPUFreq ( ( cpufreq_type ) menu_id , settings - > cpuFreqDynamicPerformance ) ) {
@ -1314,7 +1314,7 @@ void kpowersave::do_setSpeedPolicy(int menu_id){
* \ b TQT_SLOT called if the user select a scheme from the menu . If there is any errormessage
* \ b TQT_SLOT called if the user select a scheme from the menu . If there is any errormessage
* while try to set the selected scheme , the user get a messagebox with info .
* while try to set the selected scheme , the user get a messagebox with info .
*/
*/
void k powersave: : do_setActiveScheme ( int i ) {
void tde powersave: : do_setActiveScheme ( int i ) {
if ( trace ) kdDebug ( ) < < funcinfo < < " IN: " < < " set scheme to: " < < i < < endl ;
if ( trace ) kdDebug ( ) < < funcinfo < < " IN: " < < " set scheme to: " < < i < < endl ;
if ( ! settings - > schemes [ i ] . isEmpty ( ) & & ( settings - > schemes [ i ] ! = settings - > currentScheme ) ) {
if ( ! settings - > schemes [ i ] . isEmpty ( ) & & ( settings - > schemes [ i ] ! = settings - > currentScheme ) ) {
@ -1341,7 +1341,7 @@ void kpowersave::do_setActiveScheme( int i ){
* If the battery is in warning state ( and powersave set pdaemon - > send_battery_state_change_message )
* If the battery is in warning state ( and powersave set pdaemon - > send_battery_state_change_message )
* the function pop - up a messagebox .
* the function pop - up a messagebox .
*/
*/
void k powersave: : update ( ) {
void tde powersave: : update ( ) {
kdDebugFuncIn ( trace ) ;
kdDebugFuncIn ( trace ) ;
int redraw_pixmap = 0 ;
int redraw_pixmap = 0 ;
@ -1440,7 +1440,7 @@ void kpowersave::update(){
/*!
/*!
* This function is involved if the CPUFreqMenu must be updated .
* This function is involved if the CPUFreqMenu must be updated .
*/
*/
void k powersave: : updateCPUFreqMenu ( ) {
void tde powersave: : updateCPUFreqMenu ( ) {
kdDebugFuncIn ( trace ) ;
kdDebugFuncIn ( trace ) ;
if ( hwinfo - > supportCPUFreq ( ) & & hwinfo - > isOnline ( ) & & hwinfo - > isCpuFreqAllowed ( ) ) {
if ( hwinfo - > supportCPUFreq ( ) & & hwinfo - > isOnline ( ) & & hwinfo - > isCpuFreqAllowed ( ) ) {
@ -1493,7 +1493,7 @@ void kpowersave::updateCPUFreqMenu(){
* By this way also set the settings for screensaver and other parameter
* By this way also set the settings for screensaver and other parameter
* related to the selected scheme .
* related to the selected scheme .
*/
*/
void k powersave: : updateSchemeMenu ( ) {
void tde powersave: : updateSchemeMenu ( ) {
kdDebugFuncIn ( trace ) ;
kdDebugFuncIn ( trace ) ;
if ( settings - > schemes . count ( ) = = 0 | | ! hwinfo - > isOnline ( ) ) {
if ( settings - > schemes . count ( ) = = 0 | | ! hwinfo - > isOnline ( ) ) {
@ -1575,13 +1575,13 @@ void kpowersave::updateSchemeMenu(){
/*!
/*!
* Reimplemented eventhandler for mouse enterEvent . This is called if the mouse cursor
* Reimplemented eventhandler for mouse enterEvent . This is called if the mouse cursor
* enters the widget . In this case if the user move the mouse cursor over the k powersave
* enters the widget . In this case if the user move the mouse cursor over the tde powersave
* trayicon . \ n \ n
* trayicon . \ n \ n
* We use this event to update the Tooltip with all needed information . The time beetween
* We use this event to update the Tooltip with all needed information . The time beetween
* the event and the automatically popup of the TQToolTip should be long enought to collect
* the event and the automatically popup of the TQToolTip should be long enought to collect
* the needed values and add a updated Tooltip .
* the needed values and add a updated Tooltip .
*/
*/
void k powersave: : enterEvent ( TQEvent */ * qee */ ) {
void tde powersave: : enterEvent ( TQEvent */ * qee */ ) {
updateTooltip ( ) ;
updateTooltip ( ) ;
@ -1593,7 +1593,7 @@ void kpowersave::enterEvent( TQEvent */*qee*/ ){
* this will raise the brightness by one level for wheel up events and lower the
* this will raise the brightness by one level for wheel up events and lower the
* brightness by one level for wheel down events .
* brightness by one level for wheel down events .
*/
*/
void k powersave: : wheelEvent ( TQWheelEvent * qwe )
void tde powersave: : wheelEvent ( TQWheelEvent * qwe )
{
{
kdDebugFuncIn ( trace ) ;
kdDebugFuncIn ( trace ) ;
@ -1617,7 +1617,7 @@ void kpowersave::wheelEvent (TQWheelEvent *qwe)
* right and the left mousebutton activate the menu . In the future this can also used
* right and the left mousebutton activate the menu . In the future this can also used
* to popup maybe a other menu .
* to popup maybe a other menu .
*/
*/
void k powersave: : mousePressEvent ( TQMouseEvent * qme ) {
void tde powersave: : mousePressEvent ( TQMouseEvent * qme ) {
kdDebugFuncIn ( trace ) ;
kdDebugFuncIn ( trace ) ;
KSystemTray : : mousePressEvent ( qme ) ;
KSystemTray : : mousePressEvent ( qme ) ;
@ -1637,19 +1637,19 @@ void kpowersave::mousePressEvent(TQMouseEvent *qme){
* \ b TQT_SLOT called if the detaileddialog is closed . With this we prevent open
* \ b TQT_SLOT called if the detaileddialog is closed . With this we prevent open
* the dialog twice , use this function to reset the used variables .
* the dialog twice , use this function to reset the used variables .
*/
*/
void k powersave: : closedetaileddialog ( ) {
void tde powersave: : closedetaileddialog ( ) {
detailedIsShown = false ;
detailedIsShown = false ;
}
}
/*!
/*!
* \ b TQT_SLOT used to display messeges in k powersave. This function
* \ b TQT_SLOT used to display messeges in tde powersave. This function
* block all messeges which we have in k powersave!
* block all messeges which we have in tde powersave!
*/
*/
void k powersave: : showErrorMessage ( TQString msg ) {
void tde powersave: : showErrorMessage ( TQString msg ) {
kdDebugFuncIn ( trace ) ;
kdDebugFuncIn ( trace ) ;
if ( settings - > psMsgAsPassivePopup ) {
if ( settings - > psMsgAsPassivePopup ) {
KPassivePopup : : message ( " KP owersave" , msg , SmallIcon ( " messagebox_warning " , 20 ) ,
KPassivePopup : : message ( " tdep owersave" , msg , SmallIcon ( " messagebox_warning " , 20 ) ,
this , i18n ( " Warning " ) . ascii ( ) , 10000 ) ;
this , i18n ( " Warning " ) . ascii ( ) , 10000 ) ;
} else {
} else {
kapp - > updateUserTimestamp ( ) ;
kapp - > updateUserTimestamp ( ) ;
@ -1666,7 +1666,7 @@ void kpowersave::showErrorMessage( TQString msg ){
* e . g . the screensaver and dpms settings . Don ' t forget to call this function if
* e . g . the screensaver and dpms settings . Don ' t forget to call this function if
* a scheme is changed or if the settings changed .
* a scheme is changed or if the settings changed .
*/
*/
void k powersave: : setSchemeSettings ( ) {
void tde powersave: : setSchemeSettings ( ) {
kdDebugFuncIn ( trace ) ;
kdDebugFuncIn ( trace ) ;
// --> check if there is a scheme set, if not, use defaults
// --> check if there is a scheme set, if not, use defaults
@ -1788,7 +1788,7 @@ void kpowersave::setSchemeSettings(){
* \ param resumed boolean value which represent information if machine
* \ param resumed boolean value which represent information if machine
* currently back from suspend / standby
* currently back from suspend / standby
*/
*/
void k powersave: : setAutoSuspend ( bool resumed ) {
void tde powersave: : setAutoSuspend ( bool resumed ) {
if ( trace ) kdDebug ( ) < < funcinfo < < " IN: " < < " resumed? " < < resumed < < endl ;
if ( trace ) kdDebug ( ) < < funcinfo < < " IN: " < < " resumed? " < < resumed < < endl ;
if ( settings - > autoInactiveActionAfter > 0 & & settings - > autoSuspend ) {
if ( settings - > autoInactiveActionAfter > 0 & & settings - > autoSuspend ) {
@ -1840,7 +1840,7 @@ void kpowersave::setAutoSuspend( bool resumed ){
* \ param resumed boolean value which represent information if machine
* \ param resumed boolean value which represent information if machine
* currently back from suspend / standby
* currently back from suspend / standby
*/
*/
void k powersave: : setAutoDimm ( bool resumed ) {
void tde powersave: : setAutoDimm ( bool resumed ) {
if ( trace ) kdDebug ( ) < < funcinfo < < " IN: " < < " resumed? " < < resumed < < endl ;
if ( trace ) kdDebug ( ) < < funcinfo < < " IN: " < < " resumed? " < < resumed < < endl ;
if ( settings - > autoDimmAfter > 0 & & settings - > autoDimm ) {
if ( settings - > autoDimmAfter > 0 & & settings - > autoDimm ) {
@ -1879,7 +1879,7 @@ void kpowersave::setAutoDimm( bool resumed ){
* \ param type integer with the type of the battery
* \ param type integer with the type of the battery
* \ param state integer represent the reached battery state
* \ param state integer represent the reached battery state
*/
*/
void k powersave: : notifyBatteryStatusChange ( int type , int state ) {
void tde powersave: : notifyBatteryStatusChange ( int type , int state ) {
if ( trace ) kdDebug ( ) < < funcinfo < < " IN: " < < " type: " < < type < < " state: " < < state < < endl ;
if ( trace ) kdDebug ( ) < < funcinfo < < " IN: " < < " type: " < < type < < " state: " < < state < < endl ;
@ -1888,14 +1888,14 @@ void kpowersave::notifyBatteryStatusChange ( int type, int state ) {
int min = primary - > getRemainingMinutes ( ) ;
int min = primary - > getRemainingMinutes ( ) ;
if ( primary - > getChargingState ( ) = = CHARGING ) {
if ( primary - > getChargingState ( ) = = CHARGING ) {
kdDebug ( ) < < " k powersave::notifyBatteryStatusChange: Battery is charging, ignore event" < < endl ;
kdDebug ( ) < < " tde powersave::notifyBatteryStatusChange: Battery is charging, ignore event" < < endl ;
return ;
return ;
}
}
if ( hwinfo - > getAcAdapter ( ) ) {
if ( hwinfo - > getAcAdapter ( ) ) {
// the machine is on AC, no need to inform about battery state,
// the machine is on AC, no need to inform about battery state,
// this is maybe only a race condition with not directly actuall
// this is maybe only a race condition with not directly actuall
// charge state
// charge state
kdDebug ( ) < < " k powersave::notifyBatteryStatusChange: Machine is on AC, ignore event" < < endl ;
kdDebug ( ) < < " tde powersave::notifyBatteryStatusChange: Machine is on AC, ignore event" < < endl ;
kdDebugFuncOut ( trace ) ;
kdDebugFuncOut ( trace ) ;
return ;
return ;
}
}
@ -1961,7 +1961,7 @@ void kpowersave::notifyBatteryStatusChange ( int type, int state ) {
* because of TQTimer : : singleShot ( ) can ' t take param . . .
* because of TQTimer : : singleShot ( ) can ' t take param . . .
* NOTE : Use this only for SHUTDOWN atm
* NOTE : Use this only for SHUTDOWN atm
*/
*/
void k powersave: : handleCriticalBatteryActionCall ( ) {
void tde powersave: : handleCriticalBatteryActionCall ( ) {
kdDebugFuncIn ( trace ) ;
kdDebugFuncIn ( trace ) ;
handleActionCall ( GO_SHUTDOWN , settings - > batteryCriticalLevelActionValue , true , true ) ;
handleActionCall ( GO_SHUTDOWN , settings - > batteryCriticalLevelActionValue , true , true ) ;
@ -1975,7 +1975,7 @@ void kpowersave::handleCriticalBatteryActionCall () {
* \ param value integer value of the action as e . g . a brightness level
* \ param value integer value of the action as e . g . a brightness level
* \ param checkAC bool if there should be a check for AC state befor call the action
* \ param checkAC bool if there should be a check for AC state befor call the action
*/
*/
void k powersave: : handleActionCall ( action action , int value , bool checkAC , bool batWarnCall ) {
void tde powersave: : handleActionCall ( action action , int value , bool checkAC , bool batWarnCall ) {
if ( trace ) kdDebug ( ) < < funcinfo < < " IN: " < < " action: " < < action < < " value: " < < value
if ( trace ) kdDebug ( ) < < funcinfo < < " IN: " < < " action: " < < action < < " value: " < < value
< < " checkAC: " < < checkAC < < endl ;
< < " checkAC: " < < checkAC < < endl ;
@ -2045,7 +2045,7 @@ void kpowersave::handleActionCall ( action action, int value , bool checkAC, boo
* and switch to the AC / battery scheme depending on the state of AC
* and switch to the AC / battery scheme depending on the state of AC
* \ param acstate boolean represent the state of AC ( true = = AC plugged in . . . )
* \ param acstate boolean represent the state of AC ( true = = AC plugged in . . . )
*/
*/
void k powersave: : handleACStatusChange ( bool acstate , bool notifyEvent ) {
void tde powersave: : handleACStatusChange ( bool acstate , bool notifyEvent ) {
if ( trace ) kdDebug ( ) < < funcinfo < < " IN: " < < " acstate: " < < acstate < < " notifyEvent: " < < notifyEvent < < endl ;
if ( trace ) kdDebug ( ) < < funcinfo < < " IN: " < < " acstate: " < < acstate < < " notifyEvent: " < < notifyEvent < < endl ;
int index ;
int index ;
@ -2082,7 +2082,7 @@ void kpowersave::handleACStatusChange ( bool acstate , bool notifyEvent ) {
* \ b TQT_SLOT called if scheme switched . Here we emit the related KNotify events
* \ b TQT_SLOT called if scheme switched . Here we emit the related KNotify events
* if they are not disabled .
* if they are not disabled .
*/
*/
void k powersave: : notifySchemeSwitch ( ) {
void tde powersave: : notifySchemeSwitch ( ) {
kdDebugFuncIn ( trace ) ;
kdDebugFuncIn ( trace ) ;
if ( ! settings - > disableNotifications ) {
if ( ! settings - > disableNotifications ) {
@ -2106,7 +2106,7 @@ void kpowersave::notifySchemeSwitch() {
* \ b TQT_SLOT called if the machine suspend . Here we emit the related KNotify events
* \ b TQT_SLOT called if the machine suspend . Here we emit the related KNotify events
* if they are not disabled .
* if they are not disabled .
*/
*/
void k powersave: : notifySuspend ( int suspendType ) {
void tde powersave: : notifySuspend ( int suspendType ) {
kdDebugFuncIn ( trace ) ;
kdDebugFuncIn ( trace ) ;
if ( ! settings - > disableNotifications ) {
if ( ! settings - > disableNotifications ) {
@ -2138,7 +2138,7 @@ void kpowersave::notifySuspend( int suspendType ) {
* \ b TQT_SLOT called to independent handleResumeSignal ( ) from event loop and
* \ b TQT_SLOT called to independent handleResumeSignal ( ) from event loop and
* to avoid problems with the QT3 D - Bus bindings
* to avoid problems with the QT3 D - Bus bindings
*/
*/
void k powersave: : forwardResumeSignal ( int result ) {
void tde powersave: : forwardResumeSignal ( int result ) {
if ( trace ) kdDebug ( ) < < funcinfo < < " IN: " < < " result: " < < result < < endl ;
if ( trace ) kdDebug ( ) < < funcinfo < < " IN: " < < " result: " < < result < < endl ;
resume_result = result ;
resume_result = result ;
@ -2152,7 +2152,7 @@ void kpowersave::forwardResumeSignal( int result ) {
* \ b TQT_SLOT called if the machine suspend . Here we emit the related KNotify events
* \ b TQT_SLOT called if the machine suspend . Here we emit the related KNotify events
* if they are not disabled .
* if they are not disabled .
*/
*/
void k powersave: : handleResumeSignal ( ) {
void tde powersave: : handleResumeSignal ( ) {
kdDebugFuncIn ( trace ) ;
kdDebugFuncIn ( trace ) ;
// fake key to show the login dialog if we locked the screen
// fake key to show the login dialog if we locked the screen
@ -2259,7 +2259,7 @@ void kpowersave::handleResumeSignal() {
* TODO : fix scheme handling
* TODO : fix scheme handling
* TODO : fix critical battery situations ( see the todo file in the source )
* TODO : fix critical battery situations ( see the todo file in the source )
*/
*/
void k powersave: : handleSessionState ( bool state ) {
void tde powersave: : handleSessionState ( bool state ) {
kdDebugFuncIn ( trace ) ;
kdDebugFuncIn ( trace ) ;
if ( state ) {
if ( state ) {
@ -2287,7 +2287,7 @@ void kpowersave::handleSessionState (bool state) {
* \ param type Integer value with the suspend type
* \ param type Integer value with the suspend type
* \ return TQString with the translated name or NULL if it fail
* \ return TQString with the translated name or NULL if it fail
*/
*/
TQString k powersave: : getSuspendString ( int type ) {
TQString tde powersave: : getSuspendString ( int type ) {
kdDebugFuncIn ( trace ) ;
kdDebugFuncIn ( trace ) ;
switch ( type ) {
switch ( type ) {
@ -2316,7 +2316,7 @@ TQString kpowersave::getSuspendString (int type) {
* \ retval true if locking the screen was successful
* \ retval true if locking the screen was successful
* \ retval false if locking the screen failed or the user don ' t wan ' t to lock
* \ retval false if locking the screen failed or the user don ' t wan ' t to lock
*/
*/
bool k powersave: : lockScreen ( ) {
bool tde powersave: : lockScreen ( ) {
kdDebugFuncIn ( trace ) ;
kdDebugFuncIn ( trace ) ;
settings - > load_general_settings ( ) ;
settings - > load_general_settings ( ) ;
@ -2330,7 +2330,7 @@ bool kpowersave::lockScreen(){
* DCOP Interface funtion to return the name of the current powersave scheme .
* DCOP Interface funtion to return the name of the current powersave scheme .
* \ return TQString with the name of the current scheme
* \ return TQString with the name of the current scheme
*/
*/
TQString k powersave: : currentScheme ( ) {
TQString tde powersave: : currentScheme ( ) {
kdDebugFuncIn ( trace ) ;
kdDebugFuncIn ( trace ) ;
if ( hwinfo - > isOnline ( ) ) {
if ( hwinfo - > isOnline ( ) ) {
@ -2346,7 +2346,7 @@ TQString kpowersave::currentScheme (){
* DCOP Interface funtion to return the name of the current cpuFreqPolicy .
* DCOP Interface funtion to return the name of the current cpuFreqPolicy .
* \ return TQString with the name of the current cpuFreqPolicy
* \ return TQString with the name of the current cpuFreqPolicy
*/
*/
TQString k powersave: : currentCPUFreqPolicy ( ) {
TQString tde powersave: : currentCPUFreqPolicy ( ) {
kdDebugFuncIn ( trace ) ;
kdDebugFuncIn ( trace ) ;
if ( hwinfo - > isOnline ( ) ) {
if ( hwinfo - > isOnline ( ) ) {
@ -2378,7 +2378,7 @@ TQString kpowersave::currentCPUFreqPolicy() {
* CPU Frequency states .
* CPU Frequency states .
* \ return TQStringList with the supported CPUFreq states
* \ return TQStringList with the supported CPUFreq states
*/
*/
TQStringList k powersave: : listCPUFreqPolicies ( ) {
TQStringList tde powersave: : listCPUFreqPolicies ( ) {
kdDebugFuncIn ( trace ) ;
kdDebugFuncIn ( trace ) ;
TQStringList ret_list ;
TQStringList ret_list ;
@ -2403,7 +2403,7 @@ TQStringList kpowersave::listCPUFreqPolicies() {
* \ retval true if successful set
* \ retval true if successful set
* \ retval false if not supported or any other failure
* \ retval false if not supported or any other failure
*/
*/
bool k powersave: : do_setCPUFreqPolicy ( TQString policy ) {
bool tde powersave: : do_setCPUFreqPolicy ( TQString policy ) {
if ( trace ) kdDebug ( ) < < funcinfo < < " IN: " < < " policy: " < < policy < < endl ;
if ( trace ) kdDebug ( ) < < funcinfo < < " IN: " < < " policy: " < < policy < < endl ;
@ -2433,7 +2433,7 @@ bool kpowersave::do_setCPUFreqPolicy( TQString policy ) {
* sleeping states .
* sleeping states .
* \ return TQStringList with the supported spleeping states
* \ return TQStringList with the supported spleeping states
*/
*/
TQStringList k powersave: : allowed_sleepingStates ( ) {
TQStringList tde powersave: : allowed_sleepingStates ( ) {
kdDebugFuncIn ( trace ) ;
kdDebugFuncIn ( trace ) ;
TQStringList sleepList ;
TQStringList sleepList ;
@ -2465,7 +2465,7 @@ TQStringList kpowersave::allowed_sleepingStates(){
* DCOP Interface funtion to send a list with the all schemes .
* DCOP Interface funtion to send a list with the all schemes .
* \ return TQStringList with all schemes
* \ return TQStringList with all schemes
*/
*/
TQStringList k powersave: : listSchemes ( ) {
TQStringList tde powersave: : listSchemes ( ) {
kdDebugFuncIn ( trace ) ;
kdDebugFuncIn ( trace ) ;
TQStringList _schemeList ;
TQStringList _schemeList ;
@ -2491,7 +2491,7 @@ TQStringList kpowersave::listSchemes(){
* \ param _scheme TQString with the scheme to set , scheme should be
* \ param _scheme TQString with the scheme to set , scheme should be
* named as list from list_schemes ( )
* named as list from list_schemes ( )
*/
*/
bool k powersave: : do_setScheme ( TQString /*_scheme*/ ) {
bool tde powersave: : do_setScheme ( TQString /*_scheme*/ ) {
kdDebugFuncIn ( trace ) ;
kdDebugFuncIn ( trace ) ;
/* int index;
/* int index;
@ -2517,7 +2517,7 @@ bool kpowersave::do_setScheme( TQString /*_scheme*/ ) {
* \ retval true if successful
* \ retval true if successful
* \ retval false if not supported or powersaved not running
* \ retval false if not supported or powersaved not running
*/
*/
bool k powersave: : do_suspendToDisk ( ) {
bool tde powersave: : do_suspendToDisk ( ) {
kdDebugFuncIn ( trace ) ;
kdDebugFuncIn ( trace ) ;
kdDebugFuncOut ( trace ) ;
kdDebugFuncOut ( trace ) ;
return do_suspend2disk ( ) ;
return do_suspend2disk ( ) ;
@ -2529,7 +2529,7 @@ bool kpowersave::do_suspendToDisk(){
* \ retval true if successful
* \ retval true if successful
* \ retval false if not supported or powersaved not running
* \ retval false if not supported or powersaved not running
*/
*/
bool k powersave: : do_suspendToRAM ( ) {
bool tde powersave: : do_suspendToRAM ( ) {
kdDebugFuncIn ( trace ) ;
kdDebugFuncIn ( trace ) ;
kdDebugFuncOut ( trace ) ;
kdDebugFuncOut ( trace ) ;
return do_suspend2ram ( ) ;
return do_suspend2ram ( ) ;
@ -2541,14 +2541,14 @@ bool kpowersave::do_suspendToRAM(){
* \ retval true if successful
* \ retval true if successful
* \ retval false if not supported or powersaved not running
* \ retval false if not supported or powersaved not running
*/
*/
bool k powersave: : do_standBy ( ) {
bool tde powersave: : do_standBy ( ) {
kdDebugFuncIn ( trace ) ;
kdDebugFuncIn ( trace ) ;
kdDebugFuncOut ( trace ) ;
kdDebugFuncOut ( trace ) ;
return do_standby ( ) ;
return do_standby ( ) ;
}
}
//! dcop function to set the brightness up
//! dcop function to set the brightness up
bool k powersave: : do_brightnessUp ( int percentageStep ) {
bool tde powersave: : do_brightnessUp ( int percentageStep ) {
kdDebugFuncIn ( trace ) ;
kdDebugFuncIn ( trace ) ;
bool retval = false ;
bool retval = false ;
@ -2562,7 +2562,7 @@ bool kpowersave::do_brightnessUp(int percentageStep) {
}
}
//! dcop function to set the brightness down
//! dcop function to set the brightness down
bool k powersave: : do_brightnessDown ( int percentageStep ) {
bool tde powersave: : do_brightnessDown ( int percentageStep ) {
kdDebugFuncIn ( trace ) ;
kdDebugFuncIn ( trace ) ;
bool retval = false ;
bool retval = false ;
@ -2581,7 +2581,7 @@ bool kpowersave::do_brightnessDown(int percentageStep) {
* \ param disable boolean which tell if the autosuspend should be stopped ( true )
* \ param disable boolean which tell if the autosuspend should be stopped ( true )
* or started ( false ) .
* or started ( false ) .
*/
*/
void k powersave: : disableAutosuspend ( bool disable ) {
void tde powersave: : disableAutosuspend ( bool disable ) {
kdDebugFuncIn ( trace ) ;
kdDebugFuncIn ( trace ) ;
if ( settings - > autoSuspend & & settings - > autoInactiveActionAfter > 0 ) {
if ( settings - > autoSuspend & & settings - > autoInactiveActionAfter > 0 ) {
@ -2603,7 +2603,7 @@ void kpowersave::disableAutosuspend( bool disable ){
/*!
/*!
* DCOP Interface funtion to open / close the detailed dialog .
* DCOP Interface funtion to open / close the detailed dialog .
*/
*/
void k powersave: : showDetailedDialog ( ) {
void tde powersave: : showDetailedDialog ( ) {
kdDebugFuncIn ( trace ) ;
kdDebugFuncIn ( trace ) ;
if ( detailedIsShown ) {
if ( detailedIsShown ) {
@ -2631,7 +2631,7 @@ void kpowersave::showDetailedDialog( ){
* \ retval false if failed ( e . g . D - Bus or HAL is not running )
* \ retval false if failed ( e . g . D - Bus or HAL is not running )
* \ retval true if correct opend
* \ retval true if correct opend
*/
*/
bool k powersave: : openConfigureDialog ( ) {
bool tde powersave: : openConfigureDialog ( ) {
kdDebugFuncIn ( trace ) ;
kdDebugFuncIn ( trace ) ;
if ( hwinfo - > isOnline ( ) ) {
if ( hwinfo - > isOnline ( ) ) {
@ -2651,7 +2651,7 @@ bool kpowersave::openConfigureDialog (){
* \ retval false if current scheme does not overwrite DPMS
* \ retval false if current scheme does not overwrite DPMS
* \ retval true if current scheme does
* \ retval true if current scheme does
*/
*/
bool k powersave: : currentSchemeManagesDPMS ( ) {
bool tde powersave: : currentSchemeManagesDPMS ( ) {
kdDebugFuncIn ( trace ) ;
kdDebugFuncIn ( trace ) ;
return settings - > specPMSettings ;
return settings - > specPMSettings ;
@ -2661,7 +2661,7 @@ bool kpowersave::currentSchemeManagesDPMS () {
//! dcop funtion to get the current brightness level
//! dcop funtion to get the current brightness level
int k powersave: : brightnessGet ( ) {
int tde powersave: : brightnessGet ( ) {
kdDebugFuncIn ( trace ) ;
kdDebugFuncIn ( trace ) ;
int retval = - 1 ;
int retval = - 1 ;
@ -2675,4 +2675,4 @@ int kpowersave::brightnessGet() {
return retval ;
return retval ;
}
}
# include " k powersave.moc"
# include " tde powersave.moc"