author | harlekin <harlekin> | 2002-10-27 16:55:45 (UTC) |
---|---|---|
committer | harlekin <harlekin> | 2002-10-27 16:55:45 (UTC) |
commit | 27a2748d4a5893a888b19d3ed453be29cac0d75b (patch) (side-by-side diff) | |
tree | c9fdf0333553ab90c0f017d45e57992a63035079 | |
parent | 417d7bd0d307921b4540e99b8f52d10a03729153 (diff) | |
download | opie-27a2748d4a5893a888b19d3ed453be29cac0d75b.zip opie-27a2748d4a5893a888b19d3ed453be29cac0d75b.tar.gz opie-27a2748d4a5893a888b19d3ed453be29cac0d75b.tar.bz2 |
some whatsthis and further updates ( disabling dim when on light sensor)
-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 @@ -55,15 +55,13 @@ 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 @@ -75,9 +73,7 @@ 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 ) { @@ -124,10 +120,6 @@ 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); @@ -150,8 +142,8 @@ 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 ) ) ) ; @@ -168,8 +160,7 @@ LightSettings::LightSettings( QWidget* parent, const char* name, WFlags fl ) connect( brightness_ac_3, SIGNAL( valueChanged(int) ), this, SLOT( applyBrightnessAC() ) ); } -LightSettings::~LightSettings() -{ +LightSettings::~LightSettings() { } void LightSettings::slotSliderTicks( int steps ) { @@ -186,7 +177,6 @@ static void set_fl(int bright) void LightSettings::reject() { set_fl(initbright); - QDialog::reject(); } @@ -284,5 +274,5 @@ 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 @@ -333,6 +333,10 @@ <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> @@ -464,6 +468,10 @@ <name>text</name> <string>Calibrate</string> </property> + <property> + <name>whatsThis</name> + <string>Advanced settings for light sensor handling</string> + </property> </widget> </hbox> </widget> @@ -772,6 +780,10 @@ <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> @@ -903,6 +915,10 @@ <name>text</name> <string>Calibrate</string> </property> + <property> + <name>whatsThis</name> + <string>Advanced settings for light sensor handling</string> + </property> </widget> </hbox> </widget> @@ -1174,11 +1190,110 @@ <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> |