summaryrefslogtreecommitdiff
authorskyhusker <skyhusker>2005-06-17 15:17:10 (UTC)
committer skyhusker <skyhusker>2005-06-17 15:17:10 (UTC)
commit59c9cc89634e83fee9a6ee7162500b3c4d294233 (patch) (side-by-side diff)
treebb0bc772d505cb3da34f576772510fdfa601785f
parentc36e39b5b1e450e64d4c38cb59e56048a2bec258 (diff)
downloadopie-59c9cc89634e83fee9a6ee7162500b3c4d294233.zip
opie-59c9cc89634e83fee9a6ee7162500b3c4d294233.tar.gz
opie-59c9cc89634e83fee9a6ee7162500b3c4d294233.tar.bz2
Fix bug #1557
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/settings/light-and-power/light.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/core/settings/light-and-power/light.cpp b/core/settings/light-and-power/light.cpp
index 1c61787..d0ac878 100644
--- a/core/settings/light-and-power/light.cpp
+++ b/core/settings/light-and-power/light.cpp
@@ -127,99 +127,99 @@ LightSettings::LightSettings( QWidget* parent, const char* name, WFlags )
//
if (m_cres) {
contrast-> setTickInterval ( QMAX( 16, 256 / m_cres ));
contrast-> setLineStep ( QMAX( 1, 256 / m_cres ));
contrast-> setPageStep ( QMAX( 1, 256 / m_cres ));
contrast-> setValue ( contr );
}
// light sensor
auto_brightness-> setChecked ( config. readBoolEntry ( "LightSensor", false ));
m_sensordata = config. readListEntry ( "LightSensorData", ';' );
config. setGroup ( "AC" );
// ac spinboxes
interval_dim_ac-> setValue ( config. readNumEntry ( "Dim", 60 ));
interval_lightoff_ac-> setValue ( config. readNumEntry ( "LightOff", 120 ));
interval_suspend_ac-> setValue ( config. readNumEntry ( "Suspend", 0 ));
// ac check and slider
LcdOffOnly_ac-> setChecked ( config. readBoolEntry ( "LcdOffOnly", false ));
// CPU frequency
frequency_ac->setCurrentItem( config.readNumEntry("Freq", 0) );
// hinge action
closeHingeAction_ac->setCurrentItem( config.readNumEntry("CloseHingeAction", 0) );
bright = config. readNumEntry ( "Brightness", 255 );
brightness_ac-> setTickInterval ( QMAX( 16, 256 / m_bres ));
brightness_ac-> setLineStep ( QMAX( 1, 256 / m_bres ));
brightness_ac-> setPageStep ( QMAX( 1, 256 / m_bres ));
brightness_ac-> setValue ( bright );
if (m_cres) {
contr = config. readNumEntry ( "Contrast", 127);
contrast_ac-> setTickInterval ( QMAX( 16, 256 / m_cres ));
contrast_ac-> setLineStep ( QMAX( 1, 256 / m_cres ));
contrast_ac-> setPageStep ( QMAX( 1, 256 / m_cres ));
contrast_ac-> setValue ( contr );
}
// light sensor
auto_brightness_ac-> setChecked ( config. readBoolEntry ( "LightSensor", false ));
m_sensordata_ac = config. readListEntry ( "LightSensorData", ';' );
// warnings
config. setGroup ( "Warnings" );
- warnintervalBox-> setValue ( config. readNumEntry ( "checkinterval", 10000 ) / 1000 );
- lowSpinBox-> setValue ( config. readNumEntry ( "powerverylow", 10 ) );
- criticalSpinBox-> setValue ( config. readNumEntry ( "powercritical", 5 ) );
+ warnintervalBox-> setValue ( config. readNumEntry ( "check_interval", 10000 ) / 1000 );
+ lowSpinBox-> setValue ( config. readNumEntry ( "power_verylow", 10 ) );
+ criticalSpinBox-> setValue ( config. readNumEntry ( "power_critical", 5 ) );
m_resettimer = new QTimer ( this );
connect ( m_resettimer, SIGNAL( timeout()), this, SLOT( resetBacklight()));
if ( PowerStatusManager::readStatus ( ). acStatus ( ) != PowerStatus::Online ) {
tabs-> setCurrentPage ( 0 );
brightness->setFocus();
}
else {
tabs-> setCurrentPage ( 1 );
brightness_ac->setFocus();
}
connect ( brightness, SIGNAL( valueChanged(int)), this, SLOT( setBacklight(int)));
connect ( brightness_ac, SIGNAL( valueChanged(int)), this, SLOT( setBacklight(int)));
if (m_cres) {
connect ( contrast, SIGNAL( valueChanged(int)), this, SLOT( setContrast(int)));
connect ( contrast_ac, SIGNAL( valueChanged(int)), this, SLOT( setContrast(int)));
}
connect( frequency, SIGNAL( activated(int) ), this, SLOT( setFrequency(int) ) );
connect( frequency_ac, SIGNAL( activated(int) ), this, SLOT( setFrequency(int) ) );
connect( closeHingeAction, SIGNAL( activated(int) ), this, SLOT( setCloseHingeAction(int) ) );
connect( closeHingeAction_ac, SIGNAL( activated(int) ), this, SLOT( setCloseHingeAction(int) ) );
}
LightSettings::~LightSettings ( )
{
}
void LightSettings::calibrateSensor ( )
{
Sensor *s = new Sensor ( m_sensordata, this );
connect ( s, SIGNAL( viewBacklight(int)), this, SLOT( setBacklight(int)));
QPEApplication::execDialog( s );
delete s;
}
void LightSettings::calibrateSensorAC ( )
{
Sensor *s = new Sensor ( m_sensordata_ac, this );
connect ( s, SIGNAL( viewBacklight(int)), this, SLOT( setBacklight(int)));
QPEApplication::execDialog ( s );
delete s;
}
void LightSettings::setBacklight ( int bright )
{
QCopEnvelope e ( "QPE/System", "setBacklight(int)" );