summaryrefslogtreecommitdiff
path: root/core/settings/light-and-power/light.cpp
Unidiff
Diffstat (limited to 'core/settings/light-and-power/light.cpp') (more/less context) (show whitespace changes)
-rw-r--r--core/settings/light-and-power/light.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/core/settings/light-and-power/light.cpp b/core/settings/light-and-power/light.cpp
index d64a063..424a64c 100644
--- a/core/settings/light-and-power/light.cpp
+++ b/core/settings/light-and-power/light.cpp
@@ -20,32 +20,35 @@
20 :     =  ...= . :.=- You should have received a copy of the GNU 20 :     =  ...= . :.=- You should have received a copy of the GNU
21 -.   .:....=;==+<; General Public License along with this file; 21 -.   .:....=;==+<; General Public License along with this file;
22  -_. . .   )=.  = see the file COPYING. If not, write to the 22  -_. . .   )=.  = see the file COPYING. If not, write to the
23    --        :-=` Free Software Foundation, Inc., 23    --        :-=` Free Software Foundation, Inc.,
24 59 Temple Place - Suite 330, 24 59 Temple Place - Suite 330,
25 Boston, MA 02111-1307, USA. 25 Boston, MA 02111-1307, USA.
26 26
27*/ 27*/
28 28
29#include "light.h" 29#include "light.h"
30#include "sensor.h" 30#include "sensor.h"
31 31
32/* OPIE */
32#include <opie2/odevice.h> 33#include <opie2/odevice.h>
34#include <opie2/odebug.h>
33 35
34#include <qpe/config.h> 36#include <qpe/config.h>
35#include <qpe/power.h> 37#include <qpe/power.h>
36#if defined(Q_WS_QWS) && !defined(QT_NO_COP) 38#if defined(Q_WS_QWS) && !defined(QT_NO_COP)
37#include <qpe/qcopenvelope_qws.h> 39#include <qpe/qcopenvelope_qws.h>
38#endif 40#endif
39 41
42/* QT */
40#include <qlabel.h> 43#include <qlabel.h>
41#include <qcheckbox.h> 44#include <qcheckbox.h>
42#include <qtabwidget.h> 45#include <qtabwidget.h>
43#include <qslider.h> 46#include <qslider.h>
44#include <qspinbox.h> 47#include <qspinbox.h>
45#include <qpushbutton.h> 48#include <qpushbutton.h>
46#include <qgroupbox.h> 49#include <qgroupbox.h>
47#include <qcombobox.h> 50#include <qcombobox.h>
48 51
49 52
50 53
51using namespace Opie::Core; 54using namespace Opie::Core;
@@ -224,37 +227,37 @@ void LightSettings::setBacklight ( int bright )
224 m_resettimer-> start ( 4000, true ); 227 m_resettimer-> start ( 4000, true );
225 } 228 }
226} 229}
227 230
228void LightSettings::setContrast ( int contr ) 231void LightSettings::setContrast ( int contr )
229{ 232{
230 if (contr == -1) contr = m_oldcontrast; 233 if (contr == -1) contr = m_oldcontrast;
231 ODevice::inst ( )-> setDisplayContrast(contr); 234 ODevice::inst ( )-> setDisplayContrast(contr);
232} 235}
233 236
234void LightSettings::setFrequency ( int index ) 237void LightSettings::setFrequency ( int index )
235{ 238{
236 qWarning("LightSettings::setFrequency(%d)", index); 239 owarn << "LightSettings::setFrequency(" << index << ")" << oendl;
237 ODevice::inst ( )-> setCurrentCpuFrequency(index); 240 ODevice::inst ( )-> setCurrentCpuFrequency(index);
238} 241}
239 242
240void LightSettings::resetBacklight ( ) 243void LightSettings::resetBacklight ( )
241{ 244{
242 setBacklight ( -1 ); 245 setBacklight ( -1 );
243 setContrast ( -1 ); 246 setContrast ( -1 );
244} 247}
245 248
246void LightSettings::setCloseHingeAction ( int index ) 249void LightSettings::setCloseHingeAction ( int index )
247{ 250{
248 qWarning("LightSettings::setCloseHingeStatus(%d)", index); 251 owarn << "LightSettings::setCloseHingeStatus(" << index << ")" << oendl;
249} 252}
250 253
251void LightSettings::accept ( ) 254void LightSettings::accept ( )
252{ 255{
253 Config config ( "apm" ); 256 Config config ( "apm" );
254 257
255 // bat 258 // bat
256 config. setGroup ( "Battery" ); 259 config. setGroup ( "Battery" );
257 config. writeEntry ( "LcdOffOnly", LcdOffOnly-> isChecked ( )); 260 config. writeEntry ( "LcdOffOnly", LcdOffOnly-> isChecked ( ));
258 config. writeEntry ( "Dim", interval_dim-> value ( )); 261 config. writeEntry ( "Dim", interval_dim-> value ( ));
259 config. writeEntry ( "LightOff", interval_lightoff-> value ( )); 262 config. writeEntry ( "LightOff", interval_lightoff-> value ( ));
260 config. writeEntry ( "Suspend", interval_suspend-> value ( )); 263 config. writeEntry ( "Suspend", interval_suspend-> value ( ));