@ -35,28 +35,28 @@
# include <kaccelmanager.h>
// QT - Headers
# include < qcheckbox.h>
# include < qcombobox.h>
# include < qdialog.h>
# include < qgroupbox.h>
# include < qlabel.h>
# include < qlineedit.h>
# include < qlistbox.h>
# include < qpushbutton.h>
# include < qslider.h>
# include < qspinbox.h>
# include < qstringlist.h>
# include < qtabwidget.h>
# include < qtoolbox.h>
# include < qtooltip.h>
# include < qstring.h>
# include < t qcheckbox.h>
# include < t qcombobox.h>
# include < t qdialog.h>
# include < t qgroupbox.h>
# include < t qlabel.h>
# include < t qlineedit.h>
# include < t qlistbox.h>
# include < t qpushbutton.h>
# include < t qslider.h>
# include < t qspinbox.h>
# include < t qstringlist.h>
# include < t qtabwidget.h>
# include < t qtoolbox.h>
# include < t qtooltip.h>
# include < t qstring.h>
# include "configuredialog.h"
/*! This is the default constructor of the class ConfigureDialog. */
ConfigureDialog : : ConfigureDialog ( KConfig * _config , HardwareInfo * _hwinfo , Settings * _settings ,
QWidget * parent, const char * name )
: configure_Dialog ( parent, name , false , WDestructiveClose )
T QWidget * tq parent, const char * name )
: configure_Dialog ( tq parent, name , false , WDestructiveClose )
{
kdDebugFuncIn ( trace ) ;
@ -65,7 +65,7 @@ ConfigureDialog::ConfigureDialog( KConfig *_config, HardwareInfo *_hwinfo, Setti
hwinfo = _hwinfo ;
suspend = hwinfo - > getSuspendSupport ( ) ;
QString session = getenv ( " DESKTOP_SESSION " ) ;
T QString session = getenv ( " DESKTOP_SESSION " ) ;
if ( session . startsWith ( " gnome " ) ) gnome_session = true ;
else gnome_session = false ;
@ -103,10 +103,10 @@ ConfigureDialog::ConfigureDialog( KConfig *_config, HardwareInfo *_hwinfo, Setti
setInactivityBox ( ) ;
selectScheme ( settings - > currentScheme ) ;
tL_valueBrightness - > setFrameStyle ( QFrame: : Panel | QFrame: : Sunken ) ;
tL_valueBrightness - > setBackgroundMode ( Qt: : PaletteBase ) ;
tL_valueBrightness - > setAlignment( Qt: : AlignCenter ) ;
tL_valueBrightness - > setFocusPolicy ( NoFocus) ;
tL_valueBrightness - > setFrameStyle ( T QFrame: : Panel | T QFrame: : Sunken ) ;
tL_valueBrightness - > setBackgroundMode ( T Qt: : PaletteBase ) ;
tL_valueBrightness - > tq setAlignment( T Qt: : AlignCenter ) ;
tL_valueBrightness - > setFocusPolicy ( TQ_ NoFocus) ;
// hide Lid item if this is not a laptop
if ( ! hwinfo - > isLaptop ( ) )
@ -129,13 +129,13 @@ ConfigureDialog::ConfigureDialog( KConfig *_config, HardwareInfo *_hwinfo, Setti
/*! This is the default destructor of the class ConfigureDialog. */
ConfigureDialog : : ~ ConfigureDialog ( ) {
kdDebugFuncIn ( trace ) ;
// no need to delete child widgets, Qt does it all for us
// no need to delete child widgets, T Qt does it all for us
}
/* ---- START General setup SECTION ---- */
/*!
* This used to fill the QListBox listBox_schemes and the scheme related QComboBoxes
* This used to fill the T QListBox listBox_schemes and the scheme related T QComboBoxes
* with the existing schemes .
*/
void ConfigureDialog : : setSchemeList ( ) {
@ -145,30 +145,30 @@ void ConfigureDialog::setSchemeList(){
cB_acScheme - > clear ( ) ;
cB_batteryScheme - > clear ( ) ;
for ( QStringList: : Iterator it = schemes . begin ( ) ; it ! = schemes . end ( ) ; + + it ) {
for ( T QStringList: : Iterator it = schemes . begin ( ) ; it ! = schemes . end ( ) ; + + it ) {
const char * _tmp = ( * it ) . ascii ( ) ;
if ( _tmp = = " Performance " | | _tmp = = i18n ( " Performance " ) ) {
listBox_schemes - > insertItem ( SmallIcon ( " scheme_power " , QIconSet: : Automatic ) , i18n ( _tmp ) ) ;
listBox_schemes - > insertItem ( SmallIcon ( " scheme_power " , T QIconSet: : Automatic ) , i18n ( _tmp ) ) ;
cB_acScheme - > insertItem ( i18n ( _tmp ) ) ;
cB_batteryScheme - > insertItem ( i18n ( _tmp ) ) ;
} else if ( _tmp = = " Powersave " | | _tmp = = i18n ( " Powersave " ) ) {
listBox_schemes - > insertItem ( SmallIcon ( " scheme_powersave " , QIconSet: : Automatic ) ,
listBox_schemes - > insertItem ( SmallIcon ( " scheme_powersave " , T QIconSet: : Automatic ) ,
i18n ( _tmp ) ) ;
cB_acScheme - > insertItem ( i18n ( _tmp ) ) ;
cB_batteryScheme - > insertItem ( i18n ( _tmp ) ) ;
} else if ( _tmp = = " Presentation " | | _tmp = = i18n ( " Presentation " ) ) {
listBox_schemes - > insertItem ( SmallIcon ( " scheme_presentation " , QIconSet: : Automatic ) ,
listBox_schemes - > insertItem ( SmallIcon ( " scheme_presentation " , T QIconSet: : Automatic ) ,
i18n ( _tmp ) ) ;
cB_acScheme - > insertItem ( i18n ( _tmp ) ) ;
cB_batteryScheme - > insertItem ( i18n ( _tmp ) ) ;
} else if ( _tmp = = " Acoustic " | | _tmp = = i18n ( " Acoustic " ) ) {
listBox_schemes - > insertItem ( SmallIcon ( " scheme_acoustic " , QIconSet: : Automatic ) ,
listBox_schemes - > insertItem ( SmallIcon ( " scheme_acoustic " , T QIconSet: : Automatic ) ,
i18n ( _tmp ) ) ;
cB_acScheme - > insertItem ( i18n ( _tmp ) ) ;
cB_batteryScheme - > insertItem ( i18n ( _tmp ) ) ;
} else if ( _tmp = = " AdvancedPowersave " | | _tmp = = i18n ( " Advanced Powersave " ) ) {
listBox_schemes - > insertItem ( SmallIcon ( " scheme_advanced_powersave " ,
QIconSet: : Automatic ) , i18n ( " Advanced Powersave " ) ) ;
T QIconSet: : Automatic ) , i18n ( " Advanced Powersave " ) ) ;
cB_acScheme - > insertItem ( i18n ( " Advanced Powersave " ) ) ;
cB_batteryScheme - > insertItem ( i18n ( " Advanced Powersave " ) ) ;
} else {
@ -198,14 +198,14 @@ void ConfigureDialog::getSchemeList(){
/*!
* This used to set the current scheme based on the name of the scheme
* \ param _scheme QString with the name of the scheme
* \ param _scheme T QString with the name of the scheme
*/
void ConfigureDialog : : selectScheme ( QString _scheme ) {
void ConfigureDialog : : selectScheme ( T QString _scheme ) {
kdDebugFuncIn ( trace ) ;
// select the current scheme in the listbox
if ( ! _scheme . isEmpty ( ) ) {
int pos = schemes . findIndex( _scheme ) ;
int pos = schemes . tq findIndex( _scheme ) ;
if ( pos > - 1 ) {
listBox_schemes - > setCurrentItem ( pos ) ;
currentScheme = pos ;
@ -226,37 +226,37 @@ void ConfigureDialog::setIcons(){
kdDebugFuncIn ( trace ) ;
/* set all Icons */
this - > setIcon ( SmallIcon ( " kpowersave " , QIconSet: : Automatic ) ) ;
buttonApply - > setIconSet ( SmallIconSet ( " apply " , QIconSet: : Automatic ) ) ;
buttonCancel - > setIconSet ( SmallIconSet ( " cancel " , QIconSet: : Automatic ) ) ;
buttonOk - > setIconSet ( SmallIconSet ( " ok " , QIconSet: : Automatic ) ) ;
buttonHelp - > setIconSet ( SmallIconSet ( " help " , QIconSet: : Automatic ) ) ;
pB_editBlacklist - > setIconSet ( SmallIconSet ( " configure " , QIconSet: : Automatic ) ) ;
pB_editBlacklistDimm - > setIconSet ( SmallIconSet ( " configure " , QIconSet: : Automatic ) ) ;
pB_editAutosuspendGBlacklist - > setIconSet ( SmallIconSet ( " configure " , QIconSet: : Automatic ) ) ;
pB_editAutodimmGBlacklist - > setIconSet ( SmallIconSet ( " configure " , QIconSet: : Automatic ) ) ;
tB_scheme - > setItemIconSet ( 0 , SmallIcon ( " kscreensaver " , QIconSet: : Automatic ) ) ;
tB_scheme - > setItemIconSet ( 1 , SmallIcon ( " display " , QIconSet: : Automatic ) ) ;
this - > setIcon ( SmallIcon ( " kpowersave " , T QIconSet: : Automatic ) ) ;
buttonApply - > setIconSet ( SmallIconSet ( " apply " , T QIconSet: : Automatic ) ) ;
buttonCancel - > setIconSet ( SmallIconSet ( " cancel " , T QIconSet: : Automatic ) ) ;
buttonOk - > setIconSet ( SmallIconSet ( " ok " , T QIconSet: : Automatic ) ) ;
buttonHelp - > setIconSet ( SmallIconSet ( " help " , T QIconSet: : Automatic ) ) ;
pB_editBlacklist - > setIconSet ( SmallIconSet ( " configure " , T QIconSet: : Automatic ) ) ;
pB_editBlacklistDimm - > setIconSet ( SmallIconSet ( " configure " , T QIconSet: : Automatic ) ) ;
pB_editAutosuspendGBlacklist - > setIconSet ( SmallIconSet ( " configure " , T QIconSet: : Automatic ) ) ;
pB_editAutodimmGBlacklist - > setIconSet ( SmallIconSet ( " configure " , T QIconSet: : Automatic ) ) ;
tB_scheme - > setItemIconSet ( 0 , SmallIcon ( " kscreensaver " , T QIconSet: : Automatic ) ) ;
tB_scheme - > setItemIconSet ( 1 , SmallIcon ( " display " , T QIconSet: : Automatic ) ) ;
if ( actions [ 0 ] = = " Suspend to Disk " )
tB_scheme - > setItemIconSet ( 2 , SmallIcon ( " suspend_to_disk " , QIconSet: : Automatic ) ) ;
tB_scheme - > setItemIconSet ( 2 , SmallIcon ( " suspend_to_disk " , T QIconSet: : Automatic ) ) ;
else if ( actions [ 0 ] = = " Suspend to RAM " )
tB_scheme - > setItemIconSet ( 2 , SmallIcon ( " suspend_to_ram " , QIconSet: : Automatic ) ) ;
tB_scheme - > setItemIconSet ( 2 , SmallIcon ( " suspend_to_ram " , T QIconSet: : Automatic ) ) ;
else if ( actions [ 0 ] = = " Standby " )
tB_scheme - > setItemIconSet ( 2 , SmallIcon ( " stand_by " , QIconSet: : Automatic ) ) ;
tB_scheme - > setItemIconSet ( 2 , SmallIcon ( " stand_by " , T QIconSet: : Automatic ) ) ;
tB_scheme - > setItemIconSet ( 3 , SmallIcon ( " autodimm " , QIconSet: : Automatic ) ) ;
tB_scheme - > setItemIconSet ( 4 , SmallIcon ( " processor " , QIconSet: : Automatic ) ) ;
tB_scheme - > setItemIconSet ( 5 , SmallIcon ( " misc " , QIconSet: : Automatic ) ) ;
tB_scheme - > setItemIconSet ( 3 , SmallIcon ( " autodimm " , T QIconSet: : Automatic ) ) ;
tB_scheme - > setItemIconSet ( 4 , SmallIcon ( " processor " , T QIconSet: : Automatic ) ) ;
tB_scheme - > setItemIconSet ( 5 , SmallIcon ( " misc " , T QIconSet: : Automatic ) ) ;
tB_general - > setItemIconSet ( 0 , SmallIcon ( " scheme_powersave " , QIconSet: : Automatic ) ) ;
tB_general - > setItemIconSet ( 1 , SmallIcon ( " button " , QIconSet: : Automatic ) ) ;
tB_general - > setItemIconSet ( 2 , SmallIcon ( " scheme_power " , QIconSet: : Automatic ) ) ;
tB_general - > setItemIconSet ( 3 , SmallIcon ( " lock " , QIconSet: : Automatic ) ) ;
tB_general - > setItemIconSet ( 4 , SmallIcon ( " misc " , QIconSet: : Automatic ) ) ;
pB_configNotify - > setIconSet ( SmallIconSet ( " knotify " , QIconSet: : Automatic ) ) ;
tB_general - > setItemIconSet ( 0 , SmallIcon ( " scheme_powersave " , T QIconSet: : Automatic ) ) ;
tB_general - > setItemIconSet ( 1 , SmallIcon ( " button " , T QIconSet: : Automatic ) ) ;
tB_general - > setItemIconSet ( 2 , SmallIcon ( " scheme_power " , T QIconSet: : Automatic ) ) ;
tB_general - > setItemIconSet ( 3 , SmallIcon ( " lock " , T QIconSet: : Automatic ) ) ;
tB_general - > setItemIconSet ( 4 , SmallIcon ( " misc " , T QIconSet: : Automatic ) ) ;
pB_configNotify - > setIconSet ( SmallIconSet ( " knotify " , T QIconSet: : Automatic ) ) ;
kdDebugFuncOut ( trace ) ;
}
@ -267,36 +267,36 @@ void ConfigureDialog::setIcons(){
void ConfigureDialog : : setTooltips ( ) {
kdDebugFuncIn ( trace ) ;
// QToolTip::setWakeUpDelay ( 1000 );
QToolTip: : add ( cB_specificSettings , i18n ( " This enables specific screen saver settings. \n "
// T QToolTip::setWakeUpDelay ( 1000 );
T QToolTip: : add ( cB_specificSettings , i18n ( " This enables specific screen saver settings. \n "
" Note: If selected, the global screen saver settings are \n "
" overwritten while kpowersave runs. " ) ) ;
QToolTip: : add ( cB_disable_Ss , i18n ( " This disables the screen saver. \n "
T QToolTip: : add ( cB_disable_Ss , i18n ( " This disables the screen saver. \n "
" Note: If selected, the global screen saver settings are \n "
" overwritten while kpowersave runs. " ) ) ;
QToolTip: : add ( cB_blankScreen , i18n ( " This blanks the screen instead of using a specific screen saver. \n "
T QToolTip: : add ( cB_blankScreen , i18n ( " This blanks the screen instead of using a specific screen saver. \n "
" Note: This may work only with KScreensaver. " ) ) ;
QToolTip: : add ( cB_SpecificPM , i18n ( " This enables specific DPMS settings. \n "
T QToolTip: : add ( cB_SpecificPM , i18n ( " This enables specific DPMS settings. \n "
" Note: If selected, the global DPMS settings are \n "
" overwritten while kpowersave runs. " ) ) ;
QToolTip: : add ( cB_disablePM , i18n ( " This disables DPMS support. " ) ) ;
QToolTip: : add ( cB_lockSuspend , i18n ( " If selected, the screen is locked on suspend or standby. " ) ) ;
QToolTip: : add ( cB_lockLid , i18n ( " If selected, the screen is locked if the lid close event is triggered. " ) ) ;
T QToolTip: : add ( cB_disablePM , i18n ( " This disables DPMS support. " ) ) ;
T QToolTip: : add ( cB_lockSuspend , i18n ( " If selected, the screen is locked on suspend or standby. " ) ) ;
T QToolTip: : add ( cB_lockLid , i18n ( " If selected, the screen is locked if the lid close event is triggered. " ) ) ;
QToolTip: : add ( cB_autoSuspend , i18n ( " Check this box to enable or disable automatic suspension of "
T QToolTip: : add ( cB_autoSuspend , i18n ( " Check this box to enable or disable automatic suspension of "
" the computer. " ) ) ;
QToolTip: : add ( cB_autoInactivity , i18n ( " Activate this action if the user was inactive for the defined "
T QToolTip: : add ( cB_autoInactivity , i18n ( " Activate this action if the user was inactive for the defined "
" time \n (greater than 0 minutes). If empty, nothing happens. " ) ) ;
tB_scheme - > setItemToolTip ( 0 , i18n ( " All scheme-related screen saver and DPMS settings. " ) ) ;
tB_scheme - > setItemToolTip ( 1 , i18n ( " All scheme-related display brightness settings. " ) ) ;
tB_scheme - > setItemToolTip ( 2 , i18n ( " All scheme-related automatic suspend settings. " ) ) ;
QToolTip: : add ( brightnessSlider , i18n ( " Here you can change the brightness of your display. \n "
T QToolTip: : add ( brightnessSlider , i18n ( " Here you can change the brightness of your display. \n "
" Use the slider to change the brightness directly for \n "
" testing. To reset back to previous level, please press \n "
" the 'Reset' button. " ) ) ;
QToolTip: : add ( pB_resetBrightness , i18n ( " Use this button to set back the slider and the "
T QToolTip: : add ( pB_resetBrightness , i18n ( " Use this button to set back the slider and the "
" display brightness. " ) ) ;
kdDebugFuncOut ( trace ) ;
@ -307,12 +307,12 @@ void ConfigureDialog::setTooltips(){
* This is a workaround for the case if Yast translated the name of the
* scheme In this case is a new config section created and the old settings
* would be lost .
* \ param s_scheme QString with the ' current ' name of the scheme
* \ return QString with the english name of the scheme
* \ param s_scheme T QString with the ' current ' name of the scheme
* \ return T QString with the english name of the scheme
*/
QString ConfigureDialog : : getSchemeRealName ( QString s_scheme ) {
T QString ConfigureDialog : : getSchemeRealName ( T QString s_scheme ) {
kdDebugFuncIn ( trace ) ;
QString ret = s_scheme ;
T QString ret = s_scheme ;
if ( s_scheme = = " Performance " | | s_scheme = = i18n ( " Performance " ) )
ret = " Performance " ;
@ -331,14 +331,14 @@ QString ConfigureDialog::getSchemeRealName(QString s_scheme) {
* This function is used to read the settings from configfile and
* set the values to the related dialog elements .
* \ param schemeID Integer value , represent the position of the
* scheme in the QListBox and within the pdaemon - list .
* scheme in the T QListBox and within the pdaemon - list .
*/
void ConfigureDialog : : setConfigToDialog ( int schemeID ) {
if ( trace ) kdDebug ( ) < < funcinfo < < " IN , scheme: " < < schemeID < < endl ;
initalised = false ;
QString s_scheme = getSchemeRealName ( schemes [ schemeID ] ) ;
T QString s_scheme = getSchemeRealName ( schemes [ schemeID ] ) ;
if ( kconfig - > hasGroup ( s_scheme ) ) {
settings - > load_general_settings ( ) ;
@ -349,18 +349,18 @@ void ConfigureDialog::setConfigToDialog( int schemeID ){
! s_scheme . startsWith ( settings - > battery_scheme ) ) {
// enable delete button
pB_deleteScheme - > setEnabled ( true ) ;
QToolTip: : add ( pB_deleteScheme , i18n ( " Press this button to delete the "
T QToolTip: : add ( pB_deleteScheme , i18n ( " Press this button to delete the "
" selected scheme. " ) ) ;
} else {
// disable button
pB_deleteScheme - > setEnabled ( false ) ;
QToolTip: : add ( pB_deleteScheme , i18n ( " You can't delete the current AC "
T QToolTip: : add ( pB_deleteScheme , i18n ( " You can't delete the current AC "
" or battery scheme. " ) ) ;
}
} else {
// disable button, can't delete these scheme, they are default
pB_deleteScheme - > setEnabled ( false ) ;
QToolTip: : add ( pB_deleteScheme , i18n ( " You can't delete this default scheme. " ) ) ;
T QToolTip: : add ( pB_deleteScheme , i18n ( " You can't delete this default scheme. " ) ) ;
}
kconfig - > setGroup ( s_scheme ) ;
@ -449,9 +449,9 @@ void ConfigureDialog::setConfigToDialog( int schemeID ){
cB_disablePM_toggled ( kconfig - > readBoolEntry ( " disableDPMS " , false ) ) ;
// set autosuspend related settings
QString _action = kconfig - > readEntry ( " autoInactiveAction " , " NULL " ) ;
T QString _action = kconfig - > readEntry ( " autoInactiveAction " , " NULL " ) ;
if ( _action ! = " NULL " ) {
int _index = actions . findIndex( _action ) ;
int _index = actions . tq findIndex( _action ) ;
if ( _index ! = - 1 ) {
cB_autoInactivity - > setCurrentItem ( _index ) ;
cB_autoInactivity_activated ( _index ) ;
@ -473,7 +473,7 @@ void ConfigureDialog::setConfigToDialog( int schemeID ){
kconfig - > setGroup ( " default-scheme " ) ;
_action = kconfig - > readEntry ( " autoInactiveAction " , " NULL " ) ;
if ( _action ! = " NULL " ) {
int _index = actions . findIndex( _action ) ;
int _index = actions . tq findIndex( _action ) ;
if ( _index ! = - 1 ) {
cB_autoInactivity - > setCurrentItem ( _index ) ;
tL_autoInactivity_After - > setEnabled ( true ) ;
@ -536,11 +536,11 @@ void ConfigureDialog::setConfigToDialog( int schemeID ){
int i_brightnessPercent = kconfig - > readNumEntry ( " brightnessPercent " , - 1 ) ;
if ( i_brightnessPercent > = 0 ) {
brightnessSlider - > setValue ( i_brightnessPercent ) ;
tL_valueBrightness - > setText ( QString: : number ( i_brightnessPercent ) + " % " ) ;
tL_valueBrightness - > setText ( T QString: : number ( i_brightnessPercent ) + " % " ) ;
}
else {
brightnessSlider - > setValue ( 100 ) ;
tL_valueBrightness - > setText ( QString: : number ( 100 ) + " % " ) ;
tL_valueBrightness - > setText ( T QString: : number ( 100 ) + " % " ) ;
}
tL_brightness - > setText ( i18n ( " Your hardware supports to change the brightness. The "
@ -602,7 +602,7 @@ void ConfigureDialog::setConfigToDialog( int schemeID ){
}
if ( hwinfo - > supportCPUFreq ( ) ) {
QString cpuFreqPolicy = kconfig - > readEntry ( " cpuFreqPolicy " ) ;
T QString cpuFreqPolicy = kconfig - > readEntry ( " cpuFreqPolicy " ) ;
if ( cpuFreqPolicy . isEmpty ( ) ) {
// load value from default-scheme
@ -659,7 +659,7 @@ void ConfigureDialog::setGeneralSettings() {
cB_autostart - > setChecked ( kconfig - > readBoolEntry ( " Autostart " , false ) ) ;
cB_autostart_neverAsk - > setChecked ( kconfig - > readBoolEntry ( " AutostartNeverAsk " , false ) ) ;
QString lockmethod = kconfig - > readEntry ( " lockMethod " , " NULL " ) ;
T QString lockmethod = kconfig - > readEntry ( " lockMethod " , " NULL " ) ;
if ( comboB_lock - > count ( ) = = 0 ) {
comboB_lock - > insertItem ( i18n ( " Select Automatically " ) , 0 ) ;
comboB_lock - > insertItem ( i18n ( " KScreensaver " ) , 1 ) ;
@ -696,21 +696,21 @@ void ConfigureDialog::setGeneralSettings() {
sB_batLowAction_value - > hide ( ) ;
sB_batCritAction_value - > hide ( ) ;
QString _select ;
QStringList _actions = kconfig - > readListEntry ( " batteryAllowedActions " , QString( ) ) ;
_select = kconfig - > readEntry ( " batteryWarningAction " , QString( ) ) ;
T QString _select ;
T QStringList _actions = kconfig - > readListEntry ( " batteryAllowedActions " , T QString( ) ) ;
_select = kconfig - > readEntry ( " batteryWarningAction " , T QString( ) ) ;
fillActionComboBox ( cB_batWarning , _actions , _select ) ;
if ( _select = = " BRIGHTNESS " & & hwinfo - > supportBrightness ( ) ) {
sB_batWarnAction_value - > show ( ) ;
sB_batWarnAction_value - > setValue ( kconfig - > readNumEntry ( " batteryWarningActionValue " , 0 ) ) ;
}
_select = kconfig - > readEntry ( " batteryLowAction " , QString( ) ) ;
_select = kconfig - > readEntry ( " batteryLowAction " , T QString( ) ) ;
fillActionComboBox ( cB_batLow , _actions , _select ) ;
if ( _select = = " BRIGHTNESS " & & hwinfo - > supportBrightness ( ) ) {
sB_batLowAction_value - > show ( ) ;
sB_batLowAction_value - > setValue ( kconfig - > readNumEntry ( " batteryLowActionValue " , 0 ) ) ;
}
_select = kconfig - > readEntry ( " batteryCriticalAction " , QString( ) ) ;
_select = kconfig - > readEntry ( " batteryCriticalAction " , T QString( ) ) ;
fillActionComboBox ( cB_batCritical , _actions , _select ) ;
if ( _select = = " BRIGHTNESS " & & hwinfo - > supportBrightness ( ) ) {
sB_batCritAction_value - > show ( ) ;
@ -723,19 +723,19 @@ void ConfigureDialog::setGeneralSettings() {
}
// buttons tab:
QStringList _actions = kconfig - > readListEntry ( " buttonsAllowedActions " , QString( ) ) ;
fillActionComboBox ( cB_PowerButton , _actions , kconfig - > readEntry ( " ActionOnPowerButton " , QString( ) ) ) ;
fillActionComboBox ( cB_SleepButton , _actions , kconfig - > readEntry ( " ActionOnSleepButton " , QString( ) ) ) ;
fillActionComboBox ( cB_S2DiskButton , _actions , kconfig - > readEntry ( " ActionOnS2DiskButton " , QString( ) ) ) ;
T QStringList _actions = kconfig - > readListEntry ( " buttonsAllowedActions " , T QString( ) ) ;
fillActionComboBox ( cB_PowerButton , _actions , kconfig - > readEntry ( " ActionOnPowerButton " , T QString( ) ) ) ;
fillActionComboBox ( cB_SleepButton , _actions , kconfig - > readEntry ( " ActionOnSleepButton " , T QString( ) ) ) ;
fillActionComboBox ( cB_S2DiskButton , _actions , kconfig - > readEntry ( " ActionOnS2DiskButton " , T QString( ) ) ) ;
// avoid logout dialog for lidclose - this make no sense
_actions . remove ( " LOGOUT_DIALOG " ) ;
fillActionComboBox ( cB_LidcloseButton , _actions , kconfig - > readEntry ( " ActionOnLidClose " , QString( ) ) ) ;
fillActionComboBox ( cB_LidcloseButton , _actions , kconfig - > readEntry ( " ActionOnLidClose " , T QString( ) ) ) ;
// default scheme tab:
QString _ac_scheme = kconfig - > readEntry ( " ac_scheme " , " Performance " ) ;
QString _bat_scheme = kconfig - > readEntry ( " battery_scheme " , " Powersave " ) ;
cB_acScheme - > setCurrentItem ( schemes . findIndex( _ac_scheme ) ) ;
cB_batteryScheme - > setCurrentItem ( schemes . findIndex( _bat_scheme ) ) ;
T QString _ac_scheme = kconfig - > readEntry ( " ac_scheme " , " Performance " ) ;
T QString _bat_scheme = kconfig - > readEntry ( " battery_scheme " , " Powersave " ) ;
cB_acScheme - > setCurrentItem ( schemes . tq findIndex( _ac_scheme ) ) ;
cB_batteryScheme - > setCurrentItem ( schemes . tq findIndex( _bat_scheme ) ) ;
kdDebugFuncOut ( trace ) ;
}
@ -750,7 +750,7 @@ void ConfigureDialog::setGeneralSettings() {
void ConfigureDialog : : saveSchemeSettings ( ) {
kdDebugFuncIn ( trace ) ;
QString s_scheme = getSchemeRealName ( schemes [ currentScheme ] ) ;
T QString s_scheme = getSchemeRealName ( schemes [ currentScheme ] ) ;
kconfig - > setGroup ( s_scheme ) ;
kconfig - > writeEntry ( " specSsSettings " , cB_specificSettings - > isOn ( ) ) ;
@ -829,7 +829,7 @@ void ConfigureDialog::saveGeneralSettings() {
kconfig - > writeEntry ( " Autostart " , cB_autostart - > isOn ( ) ) ;
kconfig - > writeEntry ( " AutostartNeverAsk " , cB_autostart_neverAsk - > isOn ( ) ) ;
QString selected_method = " " ;
T QString selected_method = " " ;
int _selected = comboB_lock - > currentItem ( ) ;
if ( _selected = = 0 ) selected_method = " automatic " ;
else if ( _selected = = 1 ) selected_method = " kscreensaver " ;
@ -843,7 +843,7 @@ void ConfigureDialog::saveGeneralSettings() {
kconfig - > writeEntry ( " batteryCritical " , sB_batCritical - > value ( ) ) ;
// battery level tab
QString _action = mapDescriptionToAction ( cB_batWarning - > currentText ( ) ) ;
T QString _action = mapDescriptionToAction ( cB_batWarning - > currentText ( ) ) ;
kconfig - > writeEntry ( " batteryWarningAction " , _action ) ;
if ( _action = = " BRIGHTNESS " ) {
kconfig - > writeEntry ( " batteryWarningActionValue " , sB_batWarnAction_value - > value ( ) ) ;
@ -918,7 +918,7 @@ void ConfigureDialog::scheme_valueChanged(){
}
/*!
* SLOT : called if the current scheme in the QListBox listBox_schemes is
* SLOT : called if the current scheme in the T QListBox listBox_schemes is
* changed / a other scheme was selected .
*/
void ConfigureDialog : : listBox_schemes_currentChanged ( ) {
@ -1028,21 +1028,21 @@ void ConfigureDialog::pB_newScheme_clicked(){
bool _ok = false ;
bool _end = false ;
QString _new ;
QString _text = i18n ( " Please insert a name for the new scheme: " ) ;
QString _error ;
T QString _new ;
T QString _text = i18n ( " Please insert a name for the new scheme: " ) ;
T QString _error ;
getSchemeList ( ) ;
while ( ! _end ) {
_new = KInputDialog : : getText ( i18n ( " KPowersave Configuration " ) ,
_error + _text , QString: : null , & _ok , this ) ;
_error + _text , TQString( ) , & _ok , this ) ;
if ( ! _ok ) {
_end = true ;
} else {
_error = QString( ) ;
_error = T QString( ) ;
if ( ! _new . isEmpty ( ) ) {
if ( schemes . contains( _new ) )
if ( schemes . tq contains( _new ) )
_error = i18n ( " Error: A scheme with this name already exist. \n " ) ;
else
_end = true ;
@ -1074,12 +1074,12 @@ void ConfigureDialog::pB_deleteScheme_clicked(){
if ( pB_deleteScheme - > isEnabled ( ) ) {
int answer = KMessageBox : : questionYesNo ( this , i18n ( " Do you really want to delete the "
" %1 scheme? " ) . arg( schemes [ currentScheme ] ) ,
" %1 scheme? " ) . tq arg( schemes [ currentScheme ] ) ,
i18n ( " Confirm delete scheme " ) ,
i18n ( " Delete " ) , i18n ( " Cancel " ) ) ;
if ( answer = = KMessageBox : : Yes ) {
// delete the scheme, we can be sure this is a userscheme
QString _s_tmp = getSchemeRealName ( schemes [ currentScheme ] ) ;
T QString _s_tmp = getSchemeRealName ( schemes [ currentScheme ] ) ;
if ( kconfig - > hasGroup ( _s_tmp ) & & kconfig - > deleteGroup ( _s_tmp ) ) {
schemes . remove ( _s_tmp ) ;
kconfig - > setGroup ( " General " ) ;
@ -1105,7 +1105,7 @@ void ConfigureDialog::pB_deleteScheme_clicked(){
/* ---- START SCREENSAVER SECTION ---- */
/*!
* SLOT : called if QCheckBox cB_specificSettings is toggled .
* SLOT : called if T QCheckBox cB_specificSettings is toggled .
* \ param state boolean , true if toggled on
* false if toggled off
*/
@ -1133,7 +1133,7 @@ void ConfigureDialog::cB_specificSettings_toggled(bool state){
}
/*!
* SLOT : called if QCheckBox cB_disable_Ss is toggled .
* SLOT : called if T QCheckBox cB_disable_Ss is toggled .
* \ param state boolean , true if toggled on
* false if toggled off
*/
@ -1153,7 +1153,7 @@ void ConfigureDialog::cB_disable_Ss_toggled(bool state){
/* ---- START DPMS SECTION ---- */
/*!
* SLOT : called if QCheckBox cB_SpecificPM is toggled .
* SLOT : called if T QCheckBox cB_SpecificPM is toggled .
* \ param state boolean , true if toggled on
* false if toggled offtrue
*/
@ -1178,7 +1178,7 @@ void ConfigureDialog::cB_SpecificPM_toggled(bool state){
}
/*!
* SLOT : called if QCheckBox cB_disablePM is toggled .
* SLOT : called if T QCheckBox cB_disablePM is toggled .
* \ param state boolean , true if toggled on
* false if toggled off
*/
@ -1199,7 +1199,7 @@ void ConfigureDialog::cB_disablePM_toggled(bool state){
}
/*!
* SLOT : called if the standby QSpinBoxes for DPMS timout is changed .
* SLOT : called if the standby T QSpinBoxes for DPMS timout is changed .
*/
void ConfigureDialog : : sB_standby_valueChanged ( ) {
kdDebugFuncIn ( trace ) ;
@ -1216,7 +1216,7 @@ void ConfigureDialog::sB_standby_valueChanged() {
}
/*!
* SLOT : called if the suspend QSpinBoxes for DPMS timout is changed .
* SLOT : called if the suspend T QSpinBoxes for DPMS timout is changed .
*/
void ConfigureDialog : : sB_suspend_valueChanged ( ) {
kdDebugFuncIn ( trace ) ;
@ -1237,7 +1237,7 @@ void ConfigureDialog::sB_suspend_valueChanged() {
}
/*!
* SLOT : called if the powerOff QSpinBoxes for DPMS timout is changed .
* SLOT : called if the powerOff T QSpinBoxes for DPMS timout is changed .
*/
void ConfigureDialog : : sB_powerOff_valueChanged ( ) {
kdDebugFuncIn ( trace ) ;
@ -1267,10 +1267,10 @@ void ConfigureDialog::setInactivityBox(){
// add "nothing" at start of the list
actions . push_front ( " " ) ;
// add "Turn Off Computer" at end of the list
// QString _to_i18n = i18n("Turn Off Computer");
// T QString _to_i18n = i18n("Turn Off Computer");
// actions.append("Turn Off Computer");
for ( QStringList: : Iterator it = actions . begin ( ) ; it ! = actions . end ( ) ; + + it ) {
for ( T QStringList: : Iterator it = actions . begin ( ) ; it ! = actions . end ( ) ; + + it ) {
cB_autoInactivity - > insertItem ( i18n ( ( * it ) . ascii ( ) ) ) ;
}
@ -1321,7 +1321,7 @@ void ConfigureDialog::cB_autoInactivity_activated( int selectedItem ) {
if ( actions [ selectedItem ] ! = " " ) {
if ( ! displayed_WARN_autosuspend & & initalised ) {
QString _msg = " <qt> " + i18n ( " <b>Note:</b> If you select this option, the computer "
T QString _msg = " <qt> " + i18n ( " <b>Note:</b> If you select this option, the computer "
" will suspend or standby if the current user is "
" inactive for the defined time even if somebody is "
" logged in remotely to the X server.<br><br> This "
@ -1388,20 +1388,20 @@ void ConfigureDialog::cB_Blacklist_toggled( bool toggled ){
void ConfigureDialog : : pB_editBlacklistSuspend_clicked ( ) {
kdDebugFuncIn ( trace ) ;
QString _top_text = " " ;
T QString _top_text = " " ;
bool initialiseImport = false ;
if ( tabWidget - > currentPageIndex ( ) = = 0 ) {
QString s_scheme = getSchemeRealName ( schemes [ listBox_schemes - > currentItem ( ) ] ) ;
T QString s_scheme = getSchemeRealName ( schemes [ listBox_schemes - > currentItem ( ) ] ) ;
_top_text = listBox_schemes - > currentText ( ) ;
if ( kconfig - > hasGroup ( s_scheme ) ) {
kconfig - > setGroup ( s_scheme ) ;
}
blacklist = kconfig - > readListEntry ( " autoInactiveSchemeBlacklist " , ' , ' ) ;
if ( blacklist . empty ( ) ) {
QString _msg = i18n ( " The blacklist of the selected scheme is empty. "
T QString _msg = i18n ( " The blacklist of the selected scheme is empty. "
" Import the general blacklist? " ) ;
int tmp = KMessageBox : : questionYesNo ( this , _msg , QString( ) , i18n ( " Import " ) , i18n ( " Do Not Import " ) ) ;
int tmp = KMessageBox : : questionYesNo ( this , _msg , T QString( ) , i18n ( " Import " ) , i18n ( " Do Not Import " ) ) ;
if ( tmp = = KMessageBox : : Yes ) {
initialiseImport = true ;
if ( kconfig - > hasGroup ( " General " ) ) {
@ -1420,24 +1420,24 @@ void ConfigureDialog::pB_editBlacklistSuspend_clicked(){
}
blacklistEDlgAS = new blacklistEditDialog ( blacklist , _top_text , initialiseImport , this ) ;
connect ( blacklistEDlgAS , SIGNAL( config_finished ( QStringList) ) , this ,
SLOT( saveSchemeSuspendBlacklist ( QStringList) ) ) ;
connect ( blacklistEDlgAS , TQT_ SIGNAL( config_finished ( T QStringList) ) , this ,
TQT_ SLOT( saveSchemeSuspendBlacklist ( T QStringList) ) ) ;
blacklistEDlgAS - > exec ( ) ;
kdDebugFuncOut ( trace ) ;
}
/*!
* SLOT : Called if the signal config_finished ( QStringList) recieved
* SLOT : Called if the signal config_finished ( T QStringList) recieved
* and the autosuspend blacklist is edited .
* \ param new_blacklist QStringlist with the edited blacklisted processes
* \ param new_blacklist T QStringlist with the edited blacklisted processes
*/
void ConfigureDialog : : saveSchemeSuspendBlacklist ( QStringList new_blacklist ) {
void ConfigureDialog : : saveSchemeSuspendBlacklist ( T QStringList new_blacklist ) {
kdDebugFuncIn ( trace ) ;
if ( tabWidget - > currentPageIndex ( ) = = 0 ) {
QString s_scheme = getSchemeRealName ( schemes [ currentScheme ] ) ;
T QString s_scheme = getSchemeRealName ( schemes [ currentScheme ] ) ;
kconfig - > setGroup ( s_scheme ) ;
kconfig - > writeEntry ( " autoInactiveSchemeBlacklist " , new_blacklist , ' , ' ) ;
}
@ -1518,20 +1518,20 @@ void ConfigureDialog::cB_BlacklistDimm_toggled( bool toggled ){
void ConfigureDialog : : pB_editBlacklistDimm_clicked ( ) {
kdDebugFuncIn ( trace ) ;
QString _top_text = " " ;
T QString _top_text = " " ;
bool initialiseImport = false ;
if ( tabWidget - > currentPageIndex ( ) = = 0 ) {
QString s_scheme = getSchemeRealName ( schemes [ listBox_schemes - > currentItem ( ) ] ) ;
T QString s_scheme = getSchemeRealName ( schemes [ listBox_schemes - > currentItem ( ) ] ) ;
_top_text = listBox_schemes - > currentText ( ) ;
if ( kconfig - > hasGroup ( s_scheme ) ) {
kconfig - > setGroup ( s_scheme ) ;
}
blacklist = kconfig - > readListEntry ( " autoDimmSchemeBlacklist " , ' , ' ) ;
if ( blacklist . empty ( ) ) {
QString _msg = i18n ( " The blacklist of the selected scheme is empty. "
T QString _msg = i18n ( " The blacklist of the selected scheme is empty. "
" Import the general blacklist? " ) ;
int tmp = KMessageBox : : questionYesNo ( this , _msg , QString( ) , i18n ( " Import " ) , i18n ( " Do Not Import " ) ) ;
int tmp = KMessageBox : : questionYesNo ( this , _msg , T QString( ) , i18n ( " Import " ) , i18n ( " Do Not Import " ) ) ;
if ( tmp = = KMessageBox : : Yes ) {
initialiseImport = true ;
if ( kconfig - > hasGroup ( " General " ) ) {
@ -1550,23 +1550,23 @@ void ConfigureDialog::pB_editBlacklistDimm_clicked(){
}
blacklistEDlgAD = new blacklistEditDialog ( blacklist , _top_text , initialiseImport , this ) ;
connect ( blacklistEDlgAD , SIGNAL( config_finished ( QStringList) ) , this ,
SLOT( saveSchemeDimmBlacklist ( QStringList) ) ) ;
connect ( blacklistEDlgAD , TQT_ SIGNAL( config_finished ( T QStringList) ) , this ,
TQT_ SLOT( saveSchemeDimmBlacklist ( T QStringList) ) ) ;
blacklistEDlgAD - > exec ( ) ;
kdDebugFuncOut ( trace ) ;
}
/*!
* SLOT : Called if the signal config_finished ( QStringList) recieved
* SLOT : Called if the signal config_finished ( T QStringList) recieved
* and the autdimm blacklist is edited .
* \ param new_blacklist QStringlist with the edited blacklisted processes
* \ param new_blacklist T QStringlist with the edited blacklisted processes
*/
void ConfigureDialog : : saveSchemeDimmBlacklist ( QStringList new_blacklist ) {
void ConfigureDialog : : saveSchemeDimmBlacklist ( T QStringList new_blacklist ) {
kdDebugFuncIn ( trace ) ;
if ( tabWidget - > currentPageIndex ( ) = = 0 ) {
QString s_scheme = getSchemeRealName ( schemes [ currentScheme ] ) ;
T QString s_scheme = getSchemeRealName ( schemes [ currentScheme ] ) ;
kconfig - > setGroup ( s_scheme ) ;
kconfig - > writeEntry ( " autoDimmSchemeBlacklist " , new_blacklist , ' , ' ) ;
}
@ -1615,7 +1615,7 @@ void ConfigureDialog::cB_Brightness_toggled( bool toggled ) {
gB_Brightness - > setEnabled ( toggled ) ;
cB_Brightness - > setChecked ( toggled ) ;
connect ( brightnessSlider , SIGNAL( valueChanged ( int ) ) , this , SLOT( brightnessSlider_sliderMoved ( int ) ) ) ;
connect ( brightnessSlider , TQT_ SIGNAL( valueChanged ( int ) ) , this , TQT_ SLOT( brightnessSlider_sliderMoved ( int ) ) ) ;
kdDebugFuncOut ( trace ) ;
}
@ -1626,7 +1626,7 @@ void ConfigureDialog::brightnessSlider_sliderMoved( int new_value ) {
if ( cB_Brightness - > isEnabled ( ) & & cB_Brightness - > isChecked ( ) ) {
scheme_valueChanged ( ) ;
tL_valueBrightness - > setText ( QString: : number ( new_value ) + " % " ) ;
tL_valueBrightness - > setText ( T QString: : number ( new_value ) + " % " ) ;
hwinfo - > setBrightness ( - 1 , new_value ) ;
pB_resetBrightness - > setEnabled ( true ) ;
brightness_changed = true ;
@ -1651,7 +1651,7 @@ void ConfigureDialog::pB_resetBrightness_clicked( ) {
/* ---- START battery level SECTION ---- */
/*!
* SLOT : called if the warning QSpinBoxes for battery level is changed .
* SLOT : called if the warning T QSpinBoxes for battery level is changed .
*/
void ConfigureDialog : : sB_batWarning_valueChanged ( ) {
kdDebugFuncIn ( trace ) ;
@ -1668,7 +1668,7 @@ void ConfigureDialog::sB_batWarning_valueChanged() {
}
/*!
* SLOT : called if the low QSpinBoxes for battery level is changed .
* SLOT : called if the low T QSpinBoxes for battery level is changed .
*/
void ConfigureDialog : : sB_batLow_valueChanged ( ) {
kdDebugFuncIn ( trace ) ;
@ -1689,7 +1689,7 @@ void ConfigureDialog::sB_batLow_valueChanged() {
}
/*!
* SLOT : called if the critical QSpinBoxes for battery level is changed .
* SLOT : called if the critical T QSpinBoxes for battery level is changed .
*/
void ConfigureDialog : : sB_batCritical_valueChanged ( ) {
kdDebugFuncIn ( trace ) ;
@ -1706,8 +1706,8 @@ void ConfigureDialog::sB_batCritical_valueChanged() {
}
/*!
* SLOT : called if the QComboBox for the battery warning level action changed ,
* used to hide / show the related QSpinboxes if needed .
* SLOT : called if the T QComboBox for the battery warning level action changed ,
* used to hide / show the related T QSpinboxes if needed .
*/
void ConfigureDialog : : cB_batWarning_activated ( ) {
kdDebugFuncIn ( trace ) ;
@ -1721,9 +1721,9 @@ void ConfigureDialog::cB_batWarning_activated() {
kdDebugFuncOut ( trace ) ;
}
//! called if the QComboBox for the battery low level action changed
//! called if the T QComboBox for the battery low level action changed
/*!
* used to hide / show the related QSpinboxes if needed .
* used to hide / show the related T QSpinboxes if needed .
*/
void ConfigureDialog : : cB_batLow_activated ( ) {
kdDebugFuncIn ( trace ) ;
@ -1738,8 +1738,8 @@ void ConfigureDialog::cB_batLow_activated() {
}
/*!
* SLOT : called if the QComboBox for the battery critical level action changed ,
* used to hide / show the related QSpinboxes if needed .
* SLOT : called if the T QComboBox for the battery critical level action changed ,
* used to hide / show the related T QSpinboxes if needed .
*/
void ConfigureDialog : : cB_batCritical_activated ( ) {
kdDebugFuncIn ( trace ) ;
@ -1767,31 +1767,31 @@ void ConfigureDialog::pB_configNotify_released( ) {
/* ---- START helper functions SECTION ---- */
/*!
* Map the key from config for a action to a descriptive name .
* \ param action QString with the config key value
* \ return QString with the description
* \ param action T QString with the config key value
* \ return T QString with the description
*/
QString ConfigureDialog : : mapActionToDescription ( QString action ) {
T QString ConfigureDialog : : mapActionToDescription ( T QString action ) {
kdDebugFuncIn ( trace ) ;
QString ret ;
T QString ret ;
if ( action . startsWith ( " SHUTDOWN " ) ) {
ret = i18n ( " Shutdown " ) ;
} else if ( action . startsWith ( " LOGOUT_DIALOG " ) ) {
ret = i18n ( " Logout Dialog " ) ;
} else if ( action . startsWith ( " SUSPEND2DISK " ) ) {
if ( actions . contains( " Suspend to Disk " ) )
if ( actions . tq contains( " Suspend to Disk " ) )
ret = i18n ( " Suspend to Disk " ) ;
} else if ( action . startsWith ( " SUSPEND2RAM " ) ) {
if ( actions . contains( " Suspend to RAM " ) )
if ( actions . tq contains( " Suspend to RAM " ) )
ret = i18n ( " Suspend to RAM " ) ;
} else if ( action . startsWith ( " CPUFRE Q_POWERSAVE" ) ) {
} else if ( action . startsWith ( " CPUFRE T Q_POWERSAVE" ) ) {
if ( hwinfo - > supportCPUFreq ( ) )
ret = i18n ( " CPU Powersave policy " ) ;
} else if ( action . startsWith ( " CPUFRE Q_DYNAMIC" ) ) {
} else if ( action . startsWith ( " CPUFRE T Q_DYNAMIC" ) ) {
if ( hwinfo - > supportCPUFreq ( ) )
ret = i18n ( " CPU Dynamic policy " ) ;
} else if ( action . startsWith ( " CPUFRE Q_PERFORMANCE" ) ) {
} else if ( action . startsWith ( " CPUFRE T Q_PERFORMANCE" ) ) {
if ( hwinfo - > supportCPUFreq ( ) )
ret = i18n ( " CPU Performance policy " ) ;
} else if ( action . startsWith ( " BRIGHTNESS " ) ) {
@ -1804,14 +1804,14 @@ QString ConfigureDialog::mapActionToDescription( QString action ) {
}
/*!
* Map the action description ( maybe translated ) back to a QString key for the config .
* \ param description QString with the description
* \ return QString with the config key value
* Map the action description ( maybe translated ) back to a T QString key for the config .
* \ param description T QString with the description
* \ return T QString with the config key value
*/
QString ConfigureDialog : : mapDescriptionToAction ( QString description ) {
T QString ConfigureDialog : : mapDescriptionToAction ( T QString description ) {
kdDebugFuncIn ( trace ) ;
QString ret ;
T QString ret ;
if ( description . startsWith ( " Shutdown " ) | | description . startsWith ( i18n ( " Shutdown " ) ) ) {
ret = " SHUTDOWN " ;
@ -1826,13 +1826,13 @@ QString ConfigureDialog::mapDescriptionToAction( QString description ) {
ret = " SUSPEND2RAM " ;
} else if ( description . startsWith ( " CPU Powersave policy " ) | |
description . startsWith ( i18n ( " CPU Powersave policy " ) ) ) {
ret = " CPUFRE Q_POWERSAVE" ;
ret = " CPUFRE T Q_POWERSAVE" ;
} else if ( description . startsWith ( " CPU Dynamic policy " ) | |
description . startsWith ( i18n ( " CPU Dynamic policy " ) ) ) {
ret = " CPUFRE Q_DYNAMIC" ;
ret = " CPUFRE T Q_DYNAMIC" ;
} else if ( description . startsWith ( " CPU Performance policy " ) | |
description . startsWith ( i18n ( " CPU Performance policy " ) ) ) {
ret = " CPUFRE Q_PERFORMANCE" ;
ret = " CPUFRE T Q_PERFORMANCE" ;
} else if ( description . startsWith ( " Set Brightness to " ) | |
description . startsWith ( i18n ( " Set Brightness to " ) ) ) {
ret = " BRIGHTNESS " ;
@ -1843,21 +1843,21 @@ QString ConfigureDialog::mapDescriptionToAction( QString description ) {
}
/*!
* Helper to fill a QComboBox with their text and select the correct item
* \ param _cb Pointer to the QComboBox
* \ param _actions QStringList with the allowed actions
* \ param _select QString with the action to select
* Helper to fill a T QComboBox with their text and select the correct item
* \ param _cb Pointer to the T QComboBox
* \ param _actions T QStringList with the allowed actions
* \ param _select T QString with the action to select
*/
void ConfigureDialog : : fillActionComboBox ( QComboBox * _cb , QStringList _actions , QString _select ) {
void ConfigureDialog : : fillActionComboBox ( T QComboBox * _cb , T QStringList _actions , T QString _select ) {
kdDebugFuncIn ( trace ) ;
_cb - > clear ( ) ;
_cb - > insertItem ( " " ) ;
for ( QStringList: : Iterator it = _actions . begin ( ) ; it ! = _actions . end ( ) ; + + it ) {
QString _tmp = * it ;
for ( T QStringList: : Iterator it = _actions . begin ( ) ; it ! = _actions . end ( ) ; + + it ) {
T QString _tmp = * it ;
QString _desc = mapActionToDescription ( _tmp ) ;
T QString _desc = mapActionToDescription ( _tmp ) ;
if ( ! _desc . isEmpty ( ) ) {
_cb - > insertItem ( _desc ) ;
if ( _tmp = = _select ) {