Diffstat (limited to 'core/settings/light-and-power/light.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/settings/light-and-power/light.cpp | 3 |
1 files changed, 3 insertions, 0 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 | |||
@@ -119,16 +119,17 @@ LightSettings::LightSettings( QWidget* parent, const char* name, WFlags ) | |||
119 | 119 | ||
120 | int bright = config. readNumEntry ( "Brightness", 127 ); | 120 | int bright = config. readNumEntry ( "Brightness", 127 ); |
121 | int contr = m_oldcontrast = config. readNumEntry ( "Contrast", 127 ); | 121 | int contr = m_oldcontrast = config. readNumEntry ( "Contrast", 127 ); |
122 | brightness-> setTickInterval ( QMAX( 16, 256 / m_bres )); | 122 | brightness-> setTickInterval ( QMAX( 16, 256 / m_bres )); |
123 | brightness-> setLineStep ( QMAX( 1, 256 / m_bres )); | 123 | brightness-> setLineStep ( QMAX( 1, 256 / m_bres )); |
124 | brightness-> setPageStep ( QMAX( 1, 256 / m_bres )); | 124 | brightness-> setPageStep ( QMAX( 1, 256 / m_bres )); |
125 | brightness-> setValue ( bright ); | 125 | brightness-> setValue ( bright ); |
126 | 126 | ||
127 | // | ||
127 | if (m_cres) { | 128 | if (m_cres) { |
128 | contrast-> setTickInterval ( QMAX( 16, 256 / m_cres )); | 129 | contrast-> setTickInterval ( QMAX( 16, 256 / m_cres )); |
129 | contrast-> setLineStep ( QMAX( 1, 256 / m_cres )); | 130 | contrast-> setLineStep ( QMAX( 1, 256 / m_cres )); |
130 | contrast-> setPageStep ( QMAX( 1, 256 / m_cres )); | 131 | contrast-> setPageStep ( QMAX( 1, 256 / m_cres )); |
131 | contrast-> setValue ( contr ); | 132 | contrast-> setValue ( contr ); |
132 | } | 133 | } |
133 | 134 | ||
134 | // light sensor | 135 | // light sensor |
@@ -175,19 +176,21 @@ LightSettings::LightSettings( QWidget* parent, const char* name, WFlags ) | |||
175 | lowSpinBox-> setValue ( config. readNumEntry ( "powerverylow", 10 ) ); | 176 | lowSpinBox-> setValue ( config. readNumEntry ( "powerverylow", 10 ) ); |
176 | criticalSpinBox-> setValue ( config. readNumEntry ( "powercritical", 5 ) ); | 177 | criticalSpinBox-> setValue ( config. readNumEntry ( "powercritical", 5 ) ); |
177 | 178 | ||
178 | m_resettimer = new QTimer ( this ); | 179 | m_resettimer = new QTimer ( this ); |
179 | connect ( m_resettimer, SIGNAL( timeout()), this, SLOT( resetBacklight())); | 180 | connect ( m_resettimer, SIGNAL( timeout()), this, SLOT( resetBacklight())); |
180 | 181 | ||
181 | if ( PowerStatusManager::readStatus ( ). acStatus ( ) != PowerStatus::Online ) { | 182 | if ( PowerStatusManager::readStatus ( ). acStatus ( ) != PowerStatus::Online ) { |
182 | tabs-> setCurrentPage ( 0 ); | 183 | tabs-> setCurrentPage ( 0 ); |
184 | brightness->setFocus(); | ||
183 | } | 185 | } |
184 | else { | 186 | else { |
185 | tabs-> setCurrentPage ( 1 ); | 187 | tabs-> setCurrentPage ( 1 ); |
188 | brightness_ac->setFocus(); | ||
186 | } | 189 | } |
187 | 190 | ||
188 | connect ( brightness, SIGNAL( valueChanged(int)), this, SLOT( setBacklight(int))); | 191 | connect ( brightness, SIGNAL( valueChanged(int)), this, SLOT( setBacklight(int))); |
189 | connect ( brightness_ac, SIGNAL( valueChanged(int)), this, SLOT( setBacklight(int))); | 192 | connect ( brightness_ac, SIGNAL( valueChanged(int)), this, SLOT( setBacklight(int))); |
190 | if (m_cres) { | 193 | if (m_cres) { |
191 | connect ( contrast, SIGNAL( valueChanged(int)), this, SLOT( setContrast(int))); | 194 | connect ( contrast, SIGNAL( valueChanged(int)), this, SLOT( setContrast(int))); |
192 | connect ( contrast_ac, SIGNAL( valueChanged(int)), this, SLOT( setContrast(int))); | 195 | connect ( contrast_ac, SIGNAL( valueChanged(int)), this, SLOT( setContrast(int))); |
193 | } | 196 | } |