summaryrefslogtreecommitdiff
path: root/core
Side-by-side diff
Diffstat (limited to 'core') (more/less context) (ignore whitespace changes)
-rw-r--r--core/settings/light-and-power/light.cpp2
-rw-r--r--core/settings/light-and-power/lightsettingsbase.ui63
2 files changed, 39 insertions, 26 deletions
diff --git a/core/settings/light-and-power/light.cpp b/core/settings/light-and-power/light.cpp
index 24e1fab..960a165 100644
--- a/core/settings/light-and-power/light.cpp
+++ b/core/settings/light-and-power/light.cpp
@@ -65,12 +65,13 @@ LightSettings::LightSettings( QWidget* parent, const char* name, WFlags fl )
interval = config.readNumEntry( "Interval", 60 );
if ( interval > 3600 ) interval /= 1000; // compatibility (was millisecs)
interval_suspend->setValue( interval );
screensaver_dim->setChecked( config.readNumEntry("Dim",1) != 0 );
screensaver_lightoff->setChecked( config.readNumEntry("LightOff",1) != 0 );
+ LcdOffOnly->setChecked( config.readNumEntry("LcdOffOnly",0) != 0 );
int maxbright = qpe_sysBrightnessSteps();
initbright = config.readNumEntry("Brightness",255);
brightness->setMaxValue( maxbright );
brightness->setTickInterval( QMAX(1,maxbright/16) );
brightness->setLineStep( QMAX(1,maxbright/16) );
brightness->setPageStep( QMAX(1,maxbright/16) );
@@ -110,12 +111,13 @@ void LightSettings::accept()
e << i_dim << i_lightoff << i_suspend;
Config config( "qpe" );
config.setGroup( "Screensaver" );
config.writeEntry( "Dim", (int)screensaver_dim->isChecked() );
config.writeEntry( "LightOff", (int)screensaver_lightoff->isChecked() );
+ config.writeEntry( "LcdOffOnly", (int)LcdOffOnly->isChecked() );
config.writeEntry( "Interval_Dim", interval_dim->value() );
config.writeEntry( "Interval_LightOff", interval_lightoff->value() );
config.writeEntry( "Interval", interval_suspend->value() );
config.writeEntry( "Brightness",
(brightness->maxValue()-brightness->value())*255/brightness->maxValue() );
config.write();
diff --git a/core/settings/light-and-power/lightsettingsbase.ui b/core/settings/light-and-power/lightsettingsbase.ui
index 47775f7..f2a4552 100644
--- a/core/settings/light-and-power/lightsettingsbase.ui
+++ b/core/settings/light-and-power/lightsettingsbase.ui
@@ -8,14 +8,14 @@
</property>
<property stdset="1">
<name>geometry</name>
<rect>
<x>0</x>
<y>0</y>
- <width>256</width>
- <height>316</height>
+ <width>269</width>
+ <height>317</height>
</rect>
</property>
<property stdset="1">
<name>caption</name>
<string>Light Settings</string>
</property>
@@ -62,17 +62,17 @@
<property>
<name>layoutSpacing</name>
</property>
<grid>
<property stdset="1">
<name>margin</name>
- <number>6</number>
+ <number>11</number>
</property>
<property stdset="1">
<name>spacing</name>
- <number>3</number>
+ <number>6</number>
</property>
<widget row="1" column="1" >
<class>QSpinBox</class>
<property stdset="1">
<name>name</name>
<cstring>interval_lightoff</cstring>
@@ -122,34 +122,12 @@
</property>
<property stdset="1">
<name>lineStep</name>
<number>15</number>
</property>
</widget>
- <widget row="1" column="0" >
- <class>QCheckBox</class>
- <property stdset="1">
- <name>name</name>
- <cstring>screensaver_lightoff</cstring>
- </property>
- <property stdset="1">
- <name>sizePolicy</name>
- <sizepolicy>
- <hsizetype>1</hsizetype>
- <vsizetype>0</vsizetype>
- </sizepolicy>
- </property>
- <property stdset="1">
- <name>text</name>
- <string>Light off after</string>
- </property>
- <property stdset="1">
- <name>checked</name>
- <bool>true</bool>
- </property>
- </widget>
<widget row="0" column="0" >
<class>QCheckBox</class>
<property stdset="1">
<name>name</name>
<cstring>screensaver_dim</cstring>
</property>
@@ -204,12 +182,45 @@
</property>
<property stdset="1">
<name>text</name>
<string>Suspend after</string>
</property>
</widget>
+ <widget row="3" column="0" rowspan="1" colspan="2" >
+ <class>QCheckBox</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>LcdOffOnly</cstring>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>Only deactivate LCD during Suspend</string>
+ </property>
+ </widget>
+ <widget row="1" column="0" >
+ <class>QCheckBox</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>screensaver_lightoff</cstring>
+ </property>
+ <property stdset="1">
+ <name>sizePolicy</name>
+ <sizepolicy>
+ <hsizetype>1</hsizetype>
+ <vsizetype>0</vsizetype>
+ </sizepolicy>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>Light off after</string>
+ </property>
+ <property stdset="1">
+ <name>checked</name>
+ <bool>true</bool>
+ </property>
+ </widget>
</grid>
</widget>
<widget>
<class>QLayoutWidget</class>
<property stdset="1">
<name>name</name>