-rw-r--r-- | core/settings/light-and-power/light.cpp | 20 | ||||
-rw-r--r-- | core/settings/light-and-power/lightsettingsbase.ui | 117 |
2 files changed, 121 insertions, 16 deletions
diff --git a/core/settings/light-and-power/light.cpp b/core/settings/light-and-power/light.cpp index 97120f2..77c6b40 100644 --- a/core/settings/light-and-power/light.cpp +++ b/core/settings/light-and-power/light.cpp @@ -56,13 +56,11 @@ using namespace Opie; -LightSettings::LightSettings( QWidget* parent, const char* name, WFlags fl ) - : LightSettingsBase( parent, name, TRUE, fl ) +LightSettings::LightSettings( QWidget* parent, const char* name, WFlags ) + : LightSettingsBase( parent, name, TRUE, WStyle_ContextHelp ) { if ( ODevice::inst()->hasLightSensor() ) { // Not supported yet - hide until implemented - auto_brightness->setEnabled( false ); CalibrateLightSensor->setEnabled( false ); - auto_brightness_ac_3->setEnabled( false ); CalibrateLightSensorAC->setEnabled( false ); } else { @@ -76,7 +74,5 @@ LightSettings::LightSettings( QWidget* parent, const char* name, WFlags fl ) Config config( "qpe" ); config.setGroup( "Screensaver" ); - int interval; - // battery spinboxes interval = config.readNumEntry( "Interval_Dim", 20 ); @@ -125,8 +121,4 @@ LightSettings::LightSettings( QWidget* parent, const char* name, WFlags fl ) // battery check and slider - - - - LcdOffOnly->setChecked( config.readNumEntry("LcdOffOnly",0) != 0 ); int maxbright = ODevice::inst ( )-> displayBrightnessResolution ( ); @@ -151,6 +143,6 @@ LightSettings::LightSettings( QWidget* parent, const char* name, WFlags fl ) // ipaq sensor config.setGroup( "Ipaqlightsensor" ); - auto_brightness->setChecked( config.readNumEntry("LightSensor",1) != 0 ); - auto_brightness_ac_3->setChecked( config.readNumEntry("LightSensorAC",1) != 0 ); + auto_brightness->setChecked( config.readNumEntry("LightSensor",0) != 0 ); + auto_brightness_ac_3->setChecked( config.readNumEntry("LightSensorAC",0) != 0 ); //LightStepSpin->setValue( config.readNumEntry("Steps", 10 ) ); //LightMinValueSlider->setValue( config.readNumEntry("MinValue", 70 ) ); @@ -169,6 +161,5 @@ LightSettings::LightSettings( QWidget* parent, const char* name, WFlags fl ) } -LightSettings::~LightSettings() -{ +LightSettings::~LightSettings() { } @@ -187,5 +178,4 @@ void LightSettings::reject() { set_fl(initbright); - QDialog::reject(); } diff --git a/core/settings/light-and-power/lightsettingsbase.ui b/core/settings/light-and-power/lightsettingsbase.ui index fee5c2c..effa460 100644 --- a/core/settings/light-and-power/lightsettingsbase.ui +++ b/core/settings/light-and-power/lightsettingsbase.ui @@ -334,4 +334,8 @@ <number>32</number> </property> + <property> + <name>whatsThis</name> + <string>set a fix value for backlight</string> + </property> </widget> <widget> @@ -465,4 +469,8 @@ <string>Calibrate</string> </property> + <property> + <name>whatsThis</name> + <string>Advanced settings for light sensor handling</string> + </property> </widget> </hbox> @@ -773,4 +781,8 @@ <enum>Right</enum> </property> + <property> + <name>whatsThis</name> + <string>set a fix value for backlight</string> + </property> </widget> <widget> @@ -904,4 +916,8 @@ <string>Calibrate</string> </property> + <property> + <name>whatsThis</name> + <string>Advanced settings for light sensor handling</string> + </property> </widget> </hbox> @@ -1175,10 +1191,109 @@ </image> </images> +<connections> + <connection> + <sender>auto_brightness</sender> + <signal>toggled(bool)</signal> + <receiver>brightness</receiver> + <slot>setDisabled(bool)</slot> + </connection> + <connection> + <sender>auto_brightness_ac_3</sender> + <signal>toggled(bool)</signal> + <receiver>brightness_ac_3</receiver> + <slot>setDisabled(bool)</slot> + </connection> + <connection> + <sender>auto_brightness_ac_3</sender> + <signal>toggled(bool)</signal> + <receiver>TextLabel1_3_2</receiver> + <slot>setDisabled(bool)</slot> + </connection> + <connection> + <sender>auto_brightness</sender> + <signal>toggled(bool)</signal> + <receiver>TextLabel1_3</receiver> + <slot>setDisabled(bool)</slot> + </connection> + <connection> + <sender>auto_brightness</sender> + <signal>toggled(bool)</signal> + <receiver>interval_dim</receiver> + <slot>setDisabled(bool)</slot> + </connection> + <connection> + <sender>auto_brightness_ac_3</sender> + <signal>toggled(bool)</signal> + <receiver>interval_dim_ac_3</receiver> + <slot>setDisabled(bool)</slot> + </connection> + <connection> + <sender>auto_brightness</sender> + <signal>toggled(bool)</signal> + <receiver>PixmapLabel2</receiver> + <slot>setDisabled(bool)</slot> + </connection> + <connection> + <sender>auto_brightness</sender> + <signal>toggled(bool)</signal> + <receiver>TextLabel4</receiver> + <slot>setDisabled(bool)</slot> + </connection> + <connection> + <sender>auto_brightness</sender> + <signal>toggled(bool)</signal> + <receiver>TextLabel5</receiver> + <slot>setDisabled(bool)</slot> + </connection> + <connection> + <sender>auto_brightness</sender> + <signal>toggled(bool)</signal> + <receiver>PixmapLabel1</receiver> + <slot>setDisabled(bool)</slot> + </connection> + <connection> + <sender>auto_brightness_ac_3</sender> + <signal>toggled(bool)</signal> + <receiver>PixmapLabel2_2_3</receiver> + <slot>setDisabled(bool)</slot> + </connection> + <connection> + <sender>auto_brightness_ac_3</sender> + <signal>toggled(bool)</signal> + <receiver>TextLabel6</receiver> + <slot>setDisabled(bool)</slot> + </connection> + <connection> + <sender>auto_brightness_ac_3</sender> + <signal>toggled(bool)</signal> + <receiver>TextLabel7</receiver> + <slot>setDisabled(bool)</slot> + </connection> + <connection> + <sender>auto_brightness_ac_3</sender> + <signal>toggled(bool)</signal> + <receiver>PixmapLabel1_2_3</receiver> + <slot>setDisabled(bool)</slot> + </connection> +</connections> <tabstops> - <tabstop>auto_brightness</tabstop> <tabstop>interval_dim</tabstop> <tabstop>interval_lightoff</tabstop> <tabstop>interval_suspend</tabstop> + <tabstop>LcdOffOnly</tabstop> <tabstop>brightness</tabstop> + <tabstop>auto_brightness</tabstop> + <tabstop>CalibrateLightSensor</tabstop> + <tabstop>TabWidget3</tabstop> + <tabstop>interval_lightoff_ac_3</tabstop> + <tabstop>interval_suspend_ac_3</tabstop> + <tabstop>interval_dim_ac_3</tabstop> + <tabstop>LcdOffOnly_2_3</tabstop> + <tabstop>brightness_ac_3</tabstop> + <tabstop>auto_brightness_ac_3</tabstop> + <tabstop>CalibrateLightSensorAC</tabstop> + <tabstop>lowSpinBox</tabstop> + <tabstop>warnintervalBox</tabstop> + <tabstop>criticalSpinBox</tabstop> </tabstops> </UI> |