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 | |||
@@ -115,24 +115,25 @@ LightSettings::LightSettings( QWidget* parent, const char* name, WFlags ) | |||
115 | frequency->setCurrentItem( config.readNumEntry("Freq", 0) ); | 115 | frequency->setCurrentItem( config.readNumEntry("Freq", 0) ); |
116 | 116 | ||
117 | // hinge action | 117 | // hinge action |
118 | closeHingeAction->setCurrentItem( config.readNumEntry("CloseHingeAction", 0) ); | 118 | closeHingeAction->setCurrentItem( config.readNumEntry("CloseHingeAction", 0) ); |
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 |
135 | auto_brightness-> setChecked ( config. readBoolEntry ( "LightSensor", false )); | 136 | auto_brightness-> setChecked ( config. readBoolEntry ( "LightSensor", false )); |
136 | m_sensordata = config. readListEntry ( "LightSensorData", ';' ); | 137 | m_sensordata = config. readListEntry ( "LightSensorData", ';' ); |
137 | 138 | ||
138 | config. setGroup ( "AC" ); | 139 | config. setGroup ( "AC" ); |
@@ -171,27 +172,29 @@ LightSettings::LightSettings( QWidget* parent, const char* name, WFlags ) | |||
171 | 172 | ||
172 | // warnings | 173 | // warnings |
173 | config. setGroup ( "Warnings" ); | 174 | config. setGroup ( "Warnings" ); |
174 | warnintervalBox-> setValue ( config. readNumEntry ( "checkinterval", 10000 ) / 1000 ); | 175 | warnintervalBox-> setValue ( config. readNumEntry ( "checkinterval", 10000 ) / 1000 ); |
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 | } |
194 | connect( frequency, SIGNAL( activated(int) ), this, SLOT( setFrequency(int) ) ); | 197 | connect( frequency, SIGNAL( activated(int) ), this, SLOT( setFrequency(int) ) ); |
195 | connect( frequency_ac, SIGNAL( activated(int) ), this, SLOT( setFrequency(int) ) ); | 198 | connect( frequency_ac, SIGNAL( activated(int) ), this, SLOT( setFrequency(int) ) ); |
196 | connect( closeHingeAction, SIGNAL( activated(int) ), this, SLOT( setCloseHingeAction(int) ) ); | 199 | connect( closeHingeAction, SIGNAL( activated(int) ), this, SLOT( setCloseHingeAction(int) ) ); |
197 | connect( closeHingeAction_ac, SIGNAL( activated(int) ), this, SLOT( setCloseHingeAction(int) ) ); | 200 | connect( closeHingeAction_ac, SIGNAL( activated(int) ), this, SLOT( setCloseHingeAction(int) ) ); |