summaryrefslogtreecommitdiff
authorharlekin <harlekin>2004-06-04 16:08:25 (UTC)
committer harlekin <harlekin>2004-06-04 16:08:25 (UTC)
commite3982ce0959fe630709aeba25f4c6d93df150ff5 (patch) (side-by-side diff)
tree8ed3dce7a96645d25a00f1819f6aa0e37bc0abc2
parent9f12abfa6b60232592aa15feea25bee28908f525 (diff)
downloadopie-e3982ce0959fe630709aeba25f4c6d93df150ff5.zip
opie-e3982ce0959fe630709aeba25f4c6d93df150ff5.tar.gz
opie-e3982ce0959fe630709aeba25f4c6d93df150ff5.tar.bz2
default focus back on the brightness sliders, closes bug 1340
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/settings/light-and-power/light.cpp3
-rw-r--r--core/settings/light-and-power/lightsettingsbase.ui17
2 files changed, 17 insertions, 3 deletions
diff --git a/core/settings/light-and-power/light.cpp b/core/settings/light-and-power/light.cpp
index 424a64c..1c61787 100644
--- a/core/settings/light-and-power/light.cpp
+++ b/core/settings/light-and-power/light.cpp
@@ -115,24 +115,25 @@ LightSettings::LightSettings( QWidget* parent, const char* name, WFlags )
frequency->setCurrentItem( config.readNumEntry("Freq", 0) );
// hinge action
closeHingeAction->setCurrentItem( config.readNumEntry("CloseHingeAction", 0) );
int bright = config. readNumEntry ( "Brightness", 127 );
int contr = m_oldcontrast = config. readNumEntry ( "Contrast", 127 );
brightness-> setTickInterval ( QMAX( 16, 256 / m_bres ));
brightness-> setLineStep ( QMAX( 1, 256 / m_bres ));
brightness-> setPageStep ( QMAX( 1, 256 / m_bres ));
brightness-> setValue ( bright );
+//
if (m_cres) {
contrast-> setTickInterval ( QMAX( 16, 256 / m_cres ));
contrast-> setLineStep ( QMAX( 1, 256 / m_cres ));
contrast-> setPageStep ( QMAX( 1, 256 / m_cres ));
contrast-> setValue ( contr );
}
// light sensor
auto_brightness-> setChecked ( config. readBoolEntry ( "LightSensor", false ));
m_sensordata = config. readListEntry ( "LightSensorData", ';' );
config. setGroup ( "AC" );
@@ -171,27 +172,29 @@ LightSettings::LightSettings( QWidget* parent, const char* name, WFlags )
// warnings
config. setGroup ( "Warnings" );
warnintervalBox-> setValue ( config. readNumEntry ( "checkinterval", 10000 ) / 1000 );
lowSpinBox-> setValue ( config. readNumEntry ( "powerverylow", 10 ) );
criticalSpinBox-> setValue ( config. readNumEntry ( "powercritical", 5 ) );
m_resettimer = new QTimer ( this );
connect ( m_resettimer, SIGNAL( timeout()), this, SLOT( resetBacklight()));
if ( PowerStatusManager::readStatus ( ). acStatus ( ) != PowerStatus::Online ) {
tabs-> setCurrentPage ( 0 );
+ brightness->setFocus();
}
else {
tabs-> setCurrentPage ( 1 );
+ brightness_ac->setFocus();
}
connect ( brightness, SIGNAL( valueChanged(int)), this, SLOT( setBacklight(int)));
connect ( brightness_ac, SIGNAL( valueChanged(int)), this, SLOT( setBacklight(int)));
if (m_cres) {
connect ( contrast, SIGNAL( valueChanged(int)), this, SLOT( setContrast(int)));
connect ( contrast_ac, SIGNAL( valueChanged(int)), this, SLOT( setContrast(int)));
}
connect( frequency, SIGNAL( activated(int) ), this, SLOT( setFrequency(int) ) );
connect( frequency_ac, SIGNAL( activated(int) ), this, SLOT( setFrequency(int) ) );
connect( closeHingeAction, SIGNAL( activated(int) ), this, SLOT( setCloseHingeAction(int) ) );
connect( closeHingeAction_ac, SIGNAL( activated(int) ), this, SLOT( setCloseHingeAction(int) ) );
diff --git a/core/settings/light-and-power/lightsettingsbase.ui b/core/settings/light-and-power/lightsettingsbase.ui
index 2af0331..1f1ff17 100644
--- a/core/settings/light-and-power/lightsettingsbase.ui
+++ b/core/settings/light-and-power/lightsettingsbase.ui
@@ -2,25 +2,25 @@
<class>LightSettingsBase</class>
<widget>
<class>QDialog</class>
<property stdset="1">
<name>name</name>
<cstring>LightSettingsBase</cstring>
</property>
<property stdset="1">
<name>geometry</name>
<rect>
<x>0</x>
<y>0</y>
- <width>331</width>
+ <width>327</width>
<height>532</height>
</rect>
</property>
<property stdset="1">
<name>sizePolicy</name>
<sizepolicy>
<hsizetype>7</hsizetype>
<vsizetype>5</vsizetype>
</sizepolicy>
</property>
<property stdset="1">
<name>caption</name>
@@ -1351,31 +1351,42 @@
</connection>
<connection>
<sender>CalibrateLightSensor_ac</sender>
<signal>clicked()</signal>
<receiver>LightSettingsBase</receiver>
<slot>calibrateSensorAC()</slot>
</connection>
<slot access="public">calibrateSensor()</slot>
<slot access="public">calibrateSensorAC()</slot>
</connections>
<tabstops>
<tabstop>brightness</tabstop>
+ <tabstop>brightness_ac</tabstop>
+ <tabstop>tabs</tabstop>
+ <tabstop>LcdOffOnly</tabstop>
+ <tabstop>closeHingeAction</tabstop>
<tabstop>interval_dim</tabstop>
<tabstop>interval_lightoff</tabstop>
<tabstop>interval_suspend</tabstop>
- <tabstop>LcdOffOnly</tabstop>
<tabstop>auto_brightness</tabstop>
<tabstop>CalibrateLightSensor</tabstop>
<tabstop>brightness</tabstop>
- <tabstop>tabs</tabstop>
<tabstop>interval_lightoff</tabstop>
<tabstop>interval_suspend</tabstop>
<tabstop>interval_dim</tabstop>
<tabstop>LcdOffOnly_ac</tabstop>
<tabstop>auto_brightness</tabstop>
<tabstop>CalibrateLightSensor_ac</tabstop>
<tabstop>lowSpinBox</tabstop>
<tabstop>warnintervalBox</tabstop>
<tabstop>criticalSpinBox</tabstop>
+ <tabstop>frequency</tabstop>
+ <tabstop>contrast</tabstop>
+ <tabstop>interval_lightoff_ac</tabstop>
+ <tabstop>interval_suspend_ac</tabstop>
+ <tabstop>interval_dim_ac</tabstop>
+ <tabstop>frequency_ac</tabstop>
+ <tabstop>closeHingeAction_ac</tabstop>
+ <tabstop>contrast_ac</tabstop>
+ <tabstop>auto_brightness_ac</tabstop>
</tabstops>
</UI>