author | harlekin <harlekin> | 2002-10-23 21:54:29 (UTC) |
---|---|---|
committer | harlekin <harlekin> | 2002-10-23 21:54:29 (UTC) |
commit | 482c5cfe8b3653888ba97716a1b29dae05200d70 (patch) (unidiff) | |
tree | 2faa98d5f15ac51ad604d58fe467dc9237c4bfc3 | |
parent | 4beb812466bd2be3946664d566cd9d9bb73d7894 (diff) | |
download | opie-482c5cfe8b3653888ba97716a1b29dae05200d70.zip opie-482c5cfe8b3653888ba97716a1b29dae05200d70.tar.gz opie-482c5cfe8b3653888ba97716a1b29dae05200d70.tar.bz2 |
new option for ac - disable all handling
-rw-r--r-- | core/settings/light-and-power/light.cpp | 7 | ||||
-rw-r--r-- | core/settings/light-and-power/lightsettingsbase.ui | 55 |
2 files changed, 58 insertions, 4 deletions
diff --git a/core/settings/light-and-power/light.cpp b/core/settings/light-and-power/light.cpp index 0193a7b..04d2249 100644 --- a/core/settings/light-and-power/light.cpp +++ b/core/settings/light-and-power/light.cpp | |||
@@ -115,6 +115,7 @@ LightSettings::LightSettings( QWidget* parent, const char* name, WFlags fl ) | |||
115 | screensaver_dim_ac_3->setChecked( config.readNumEntry("DimAC",1) != 0 ); | 115 | screensaver_dim_ac_3->setChecked( config.readNumEntry("DimAC",1) != 0 ); |
116 | screensaver_lightoff_ac_3->setChecked( config.readNumEntry("LightOffAC",1) != 0 ); | 116 | screensaver_lightoff_ac_3->setChecked( config.readNumEntry("LightOffAC",1) != 0 ); |
117 | LcdOffOnly_2_3->setChecked( config.readNumEntry("LcdOffOnlyAC",0) != 0 ); | 117 | LcdOffOnly_2_3->setChecked( config.readNumEntry("LcdOffOnlyAC",0) != 0 ); |
118 | noApmAC->setChecked( config.readNumEntry("NoApmAC",0) != 0 ); | ||
118 | int maxbright_ac = ODevice::inst ( )-> displayBrightnessResolution ( ); | 119 | int maxbright_ac = ODevice::inst ( )-> displayBrightnessResolution ( ); |
119 | initbright_ac = config.readNumEntry("BrightnessAC",255); | 120 | initbright_ac = config.readNumEntry("BrightnessAC",255); |
120 | brightness_ac_3->setMaxValue( maxbright_ac ); | 121 | brightness_ac_3->setMaxValue( maxbright_ac ); |
@@ -125,7 +126,7 @@ LightSettings::LightSettings( QWidget* parent, const char* name, WFlags fl ) | |||
125 | 126 | ||
126 | 127 | ||
127 | // ipaq sensor | 128 | // ipaq sensor |
128 | config.setGroup( "Ipaq_light_sensor" ); | 129 | config.setGroup( "Ipaqlightsensor" ); |
129 | auto_brightness->setChecked( config.readNumEntry("LightSensor",1) != 0 ); | 130 | auto_brightness->setChecked( config.readNumEntry("LightSensor",1) != 0 ); |
130 | auto_brightness_ac_3->setChecked( config.readNumEntry("LightSensorAC",1) != 0 ); | 131 | auto_brightness_ac_3->setChecked( config.readNumEntry("LightSensorAC",1) != 0 ); |
131 | LightStepSpin->setValue( config.readNumEntry("Steps", 10 ) ); | 132 | LightStepSpin->setValue( config.readNumEntry("Steps", 10 ) ); |
@@ -206,6 +207,7 @@ void LightSettings::accept() | |||
206 | config.writeEntry( "DimAC", (int)screensaver_dim_ac_3->isChecked() ); | 207 | config.writeEntry( "DimAC", (int)screensaver_dim_ac_3->isChecked() ); |
207 | config.writeEntry( "LightOffAC", (int)screensaver_lightoff_ac_3->isChecked() ); | 208 | config.writeEntry( "LightOffAC", (int)screensaver_lightoff_ac_3->isChecked() ); |
208 | config.writeEntry( "LcdOffOnlyAC", (int)LcdOffOnly_2_3->isChecked() ); | 209 | config.writeEntry( "LcdOffOnlyAC", (int)LcdOffOnly_2_3->isChecked() ); |
210 | config.writeEntry( "NoAPmAC", (int)noApmAC->isChecked() ); | ||
209 | config.writeEntry( "Interval_DimAC", interval_dim_ac_3->value() ); | 211 | config.writeEntry( "Interval_DimAC", interval_dim_ac_3->value() ); |
210 | config.writeEntry( "Interval_LightOffAC", interval_lightoff_ac_3->value() ); | 212 | config.writeEntry( "Interval_LightOffAC", interval_lightoff_ac_3->value() ); |
211 | config.writeEntry( "IntervalAC", interval_suspend_ac_3->value() ); | 213 | config.writeEntry( "IntervalAC", interval_suspend_ac_3->value() ); |
@@ -220,7 +222,7 @@ void LightSettings::accept() | |||
220 | ODevice::inst()->model() == Model_iPAQ_H38xx ) { | 222 | ODevice::inst()->model() == Model_iPAQ_H38xx ) { |
221 | 223 | ||
222 | // ipaq sensor | 224 | // ipaq sensor |
223 | config.setGroup( "Ipaq_light_sensor" ); | 225 | config.setGroup( "Ipaqlightsensor" ); |
224 | 226 | ||
225 | config.writeEntry( "LightSensor", (int)auto_brightness->isChecked() ); | 227 | config.writeEntry( "LightSensor", (int)auto_brightness->isChecked() ); |
226 | config.writeEntry( "LightSensorAC", (int)auto_brightness_ac_3->isChecked() ); | 228 | config.writeEntry( "LightSensorAC", (int)auto_brightness_ac_3->isChecked() ); |
@@ -240,7 +242,6 @@ void LightSettings::accept() | |||
240 | QCopEnvelope e_warn("QPE/System", "reloadPowerWarnSettings()"); | 242 | QCopEnvelope e_warn("QPE/System", "reloadPowerWarnSettings()"); |
241 | conf.write(); | 243 | conf.write(); |
242 | 244 | ||
243 | |||
244 | QDialog::accept(); | 245 | QDialog::accept(); |
245 | } | 246 | } |
246 | 247 | ||
diff --git a/core/settings/light-and-power/lightsettingsbase.ui b/core/settings/light-and-power/lightsettingsbase.ui index be096ac..2d0457f 100644 --- a/core/settings/light-and-power/lightsettingsbase.ui +++ b/core/settings/light-and-power/lightsettingsbase.ui | |||
@@ -11,7 +11,7 @@ | |||
11 | <rect> | 11 | <rect> |
12 | <x>0</x> | 12 | <x>0</x> |
13 | <y>0</y> | 13 | <y>0</y> |
14 | <width>415</width> | 14 | <width>411</width> |
15 | <height>532</height> | 15 | <height>532</height> |
16 | </rect> | 16 | </rect> |
17 | </property> | 17 | </property> |
@@ -693,6 +693,17 @@ | |||
693 | <string>Deactivate LCD only (does not suspend)</string> | 693 | <string>Deactivate LCD only (does not suspend)</string> |
694 | </property> | 694 | </property> |
695 | </widget> | 695 | </widget> |
696 | <widget> | ||
697 | <class>QCheckBox</class> | ||
698 | <property stdset="1"> | ||
699 | <name>name</name> | ||
700 | <cstring>noApmAC</cstring> | ||
701 | </property> | ||
702 | <property stdset="1"> | ||
703 | <name>text</name> | ||
704 | <string>No power saving features</string> | ||
705 | </property> | ||
706 | </widget> | ||
696 | </vbox> | 707 | </vbox> |
697 | </widget> | 708 | </widget> |
698 | <widget> | 709 | <widget> |
@@ -1342,6 +1353,48 @@ warning at</string> | |||
1342 | <receiver>interval_lightoff</receiver> | 1353 | <receiver>interval_lightoff</receiver> |
1343 | <slot>setEnabled(bool)</slot> | 1354 | <slot>setEnabled(bool)</slot> |
1344 | </connection> | 1355 | </connection> |
1356 | <connection> | ||
1357 | <sender>noApmAC</sender> | ||
1358 | <signal>toggled(bool)</signal> | ||
1359 | <receiver>screensaver_dim_ac_3</receiver> | ||
1360 | <slot>setDisabled(bool)</slot> | ||
1361 | </connection> | ||
1362 | <connection> | ||
1363 | <sender>noApmAC</sender> | ||
1364 | <signal>toggled(bool)</signal> | ||
1365 | <receiver>interval_dim_ac_3</receiver> | ||
1366 | <slot>setDisabled(bool)</slot> | ||
1367 | </connection> | ||
1368 | <connection> | ||
1369 | <sender>noApmAC</sender> | ||
1370 | <signal>toggled(bool)</signal> | ||
1371 | <receiver>screensaver_lightoff_ac_3</receiver> | ||
1372 | <slot>setDisabled(bool)</slot> | ||
1373 | </connection> | ||
1374 | <connection> | ||
1375 | <sender>noApmAC</sender> | ||
1376 | <signal>toggled(bool)</signal> | ||
1377 | <receiver>interval_lightoff_ac_3</receiver> | ||
1378 | <slot>setDisabled(bool)</slot> | ||
1379 | </connection> | ||
1380 | <connection> | ||
1381 | <sender>noApmAC</sender> | ||
1382 | <signal>toggled(bool)</signal> | ||
1383 | <receiver>interval_suspend_ac_3</receiver> | ||
1384 | <slot>setDisabled(bool)</slot> | ||
1385 | </connection> | ||
1386 | <connection> | ||
1387 | <sender>noApmAC</sender> | ||
1388 | <signal>toggled(bool)</signal> | ||
1389 | <receiver>LcdOffOnly_2_3</receiver> | ||
1390 | <slot>setDisabled(bool)</slot> | ||
1391 | </connection> | ||
1392 | <connection> | ||
1393 | <sender>noApmAC</sender> | ||
1394 | <signal>toggled(bool)</signal> | ||
1395 | <receiver>TextLabel1_2_2_3</receiver> | ||
1396 | <slot>setDisabled(bool)</slot> | ||
1397 | </connection> | ||
1345 | </connections> | 1398 | </connections> |
1346 | <tabstops> | 1399 | <tabstops> |
1347 | <tabstop>auto_brightness</tabstop> | 1400 | <tabstop>auto_brightness</tabstop> |