-rw-r--r-- | core/settings/light-and-power/light.cpp | 22 | ||||
-rw-r--r-- | core/settings/light-and-power/lightsettingsbase.ui | 117 |
2 files changed, 122 insertions, 17 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 @@ -54,17 +54,15 @@ #include <opie/odevice.h> 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 { // if ipaq no need to show the sensor box auto_brightness->hide(); @@ -74,11 +72,9 @@ 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 ); if ( config.readNumEntry("Dim",1) == 0 ) { interval_dim->setSpecialValueText( tr("never") ); @@ -123,12 +119,8 @@ 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 ( ); initbright = config.readNumEntry("Brightness",255); brightness->setMaxValue( maxbright ); @@ -149,10 +141,10 @@ 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 ) ); //connect( LightStepSpin, SIGNAL( valueChanged( int ) ), this, SLOT( slotSliderTicks( int ) ) ) ; //LightShiftSpin->setValue( config.readNumEntry("Shift", 0 ) ); @@ -167,10 +159,9 @@ LightSettings::LightSettings( QWidget* parent, const char* name, WFlags fl ) connect( brightness, SIGNAL( valueChanged(int) ), this, SLOT( applyBrightness() ) ); connect( brightness_ac_3, SIGNAL( valueChanged(int) ), this, SLOT( applyBrightnessAC() ) ); } -LightSettings::~LightSettings() -{ +LightSettings::~LightSettings() { } void LightSettings::slotSliderTicks( int steps ) { // LightMinValueSlider->setTickInterval( steps ); @@ -185,9 +176,8 @@ static void set_fl(int bright) void LightSettings::reject() { set_fl(initbright); - QDialog::reject(); } void LightSettings::accept() @@ -283,6 +273,6 @@ void LightSettings::applyBrightnessAC() void LightSettings::done(int r) { QDialog::done(r); - close ( ); + close (); } 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 @@ -332,8 +332,12 @@ <property stdset="1"> <name>tickInterval</name> <number>32</number> </property> + <property> + <name>whatsThis</name> + <string>set a fix value for backlight</string> + </property> </widget> <widget> <class>QLayoutWidget</class> <property stdset="1"> @@ -463,8 +467,12 @@ <property stdset="1"> <name>text</name> <string>Calibrate</string> </property> + <property> + <name>whatsThis</name> + <string>Advanced settings for light sensor handling</string> + </property> </widget> </hbox> </widget> </vbox> @@ -771,8 +779,12 @@ <property stdset="1"> <name>tickmarks</name> <enum>Right</enum> </property> + <property> + <name>whatsThis</name> + <string>set a fix value for backlight</string> + </property> </widget> <widget> <class>QLayoutWidget</class> <property stdset="1"> @@ -902,8 +914,12 @@ <property stdset="1"> <name>text</name> <string>Calibrate</string> </property> + <property> + <name>whatsThis</name> + <string>Advanced settings for light sensor handling</string> + </property> </widget> </hbox> </widget> </vbox> @@ -1173,12 +1189,111 @@ <name>image2</name> <data format="XPM.GZ" length="424">789cd3d7528808f055d0d2e72a2e492cc94c5648ce482c52d04a29cdcdad8c8eb5ade6523234530022130543251d2e253d856405bffcbc54105b19c856360003103711c4354b344b314b04719340dcb434b31488ac1e1a2020a6acac8c2ea60cc54862606ea232b218541b5810452c3111432c510f550c22886a1e482c115d0c2c88e6168818babaa4a42462c48082cae8e68102011a06b5d65c0041d3518e</data> </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> |