author | sandman <sandman> | 2002-09-30 21:40:58 (UTC) |
---|---|---|
committer | sandman <sandman> | 2002-09-30 21:40:58 (UTC) |
commit | 21cacdafcef980a5ef712de6432750128a61ccdb (patch) (unidiff) | |
tree | 7749228d50bb4741a97be25618edac126882f591 | |
parent | 9208485864ccbd2a12160334cef302874b50043a (diff) | |
download | opie-21cacdafcef980a5ef712de6432750128a61ccdb.zip opie-21cacdafcef980a5ef712de6432750128a61ccdb.tar.gz opie-21cacdafcef980a5ef712de6432750128a61ccdb.tar.bz2 |
small fix due to ODevice API change
-rw-r--r-- | core/settings/light-and-power/light.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/core/settings/light-and-power/light.cpp b/core/settings/light-and-power/light.cpp index fbea905..ded358c 100644 --- a/core/settings/light-and-power/light.cpp +++ b/core/settings/light-and-power/light.cpp | |||
@@ -18,64 +18,65 @@ | |||
18 | ** | 18 | ** |
19 | **********************************************************************/ | 19 | **********************************************************************/ |
20 | #include "settings.h" | 20 | #include "settings.h" |
21 | 21 | ||
22 | #include <qpe/global.h> | 22 | #include <qpe/global.h> |
23 | #include <qpe/fontmanager.h> | 23 | #include <qpe/fontmanager.h> |
24 | #include <qpe/config.h> | 24 | #include <qpe/config.h> |
25 | #include <qpe/applnk.h> | 25 | #include <qpe/applnk.h> |
26 | #include <qpe/qpeapplication.h> | 26 | #include <qpe/qpeapplication.h> |
27 | #if defined(Q_WS_QWS) && !defined(QT_NO_COP) | 27 | #if defined(Q_WS_QWS) && !defined(QT_NO_COP) |
28 | #include <qpe/qcopenvelope_qws.h> | 28 | #include <qpe/qcopenvelope_qws.h> |
29 | #endif | 29 | #endif |
30 | 30 | ||
31 | #include <qlabel.h> | 31 | #include <qlabel.h> |
32 | #include <qcheckbox.h> | 32 | #include <qcheckbox.h> |
33 | #include <qradiobutton.h> | 33 | #include <qradiobutton.h> |
34 | #include <qtabwidget.h> | 34 | #include <qtabwidget.h> |
35 | #include <qslider.h> | 35 | #include <qslider.h> |
36 | #include <qfile.h> | 36 | #include <qfile.h> |
37 | #include <qtextstream.h> | 37 | #include <qtextstream.h> |
38 | #include <qdatastream.h> | 38 | #include <qdatastream.h> |
39 | #include <qmessagebox.h> | 39 | #include <qmessagebox.h> |
40 | #include <qcombobox.h> | 40 | #include <qcombobox.h> |
41 | #include <qspinbox.h> | 41 | #include <qspinbox.h> |
42 | #include <qlistbox.h> | 42 | #include <qlistbox.h> |
43 | #include <qdir.h> | 43 | #include <qdir.h> |
44 | #if QT_VERSION >= 300 | 44 | #if QT_VERSION >= 300 |
45 | #include <qstylefactory.h> | 45 | #include <qstylefactory.h> |
46 | #endif | 46 | #endif |
47 | 47 | ||
48 | #include <opie/odevice.h> | 48 | #include <opie/odevice.h> |
49 | 49 | ||
50 | using namespace Opie; | ||
50 | 51 | ||
51 | LightSettings::LightSettings( QWidget* parent, const char* name, WFlags fl ) | 52 | LightSettings::LightSettings( QWidget* parent, const char* name, WFlags fl ) |
52 | : LightSettingsBase( parent, name, TRUE, fl ) | 53 | : LightSettingsBase( parent, name, TRUE, fl ) |
53 | { | 54 | { |
54 | // Not supported | 55 | // Not supported |
55 | auto_brightness->hide(); | 56 | auto_brightness->hide(); |
56 | 57 | ||
57 | Config config( "qpe" ); | 58 | Config config( "qpe" ); |
58 | 59 | ||
59 | config.setGroup( "Screensaver" ); | 60 | config.setGroup( "Screensaver" ); |
60 | 61 | ||
61 | int interval; | 62 | int interval; |
62 | interval = config.readNumEntry( "Interval_Dim", 20 ); | 63 | interval = config.readNumEntry( "Interval_Dim", 20 ); |
63 | interval_dim->setValue( interval ); | 64 | interval_dim->setValue( interval ); |
64 | interval = config.readNumEntry( "Interval_LightOff", 30 ); | 65 | interval = config.readNumEntry( "Interval_LightOff", 30 ); |
65 | interval_lightoff->setValue( interval ); | 66 | interval_lightoff->setValue( interval ); |
66 | interval = config.readNumEntry( "Interval", 60 ); | 67 | interval = config.readNumEntry( "Interval", 60 ); |
67 | if ( interval > 3600 ) interval /= 1000; // compatibility (was millisecs) | 68 | if ( interval > 3600 ) interval /= 1000; // compatibility (was millisecs) |
68 | interval_suspend->setValue( interval ); | 69 | interval_suspend->setValue( interval ); |
69 | 70 | ||
70 | screensaver_dim->setChecked( config.readNumEntry("Dim",1) != 0 ); | 71 | screensaver_dim->setChecked( config.readNumEntry("Dim",1) != 0 ); |
71 | screensaver_lightoff->setChecked( config.readNumEntry("LightOff",1) != 0 ); | 72 | screensaver_lightoff->setChecked( config.readNumEntry("LightOff",1) != 0 ); |
72 | LcdOffOnly->setChecked( config.readNumEntry("LcdOffOnly",0) != 0 ); | 73 | LcdOffOnly->setChecked( config.readNumEntry("LcdOffOnly",0) != 0 ); |
73 | int maxbright = ODevice::inst ( )-> displayBrightnessResolution ( ); | 74 | int maxbright = ODevice::inst ( )-> displayBrightnessResolution ( ); |
74 | initbright = config.readNumEntry("Brightness",255); | 75 | initbright = config.readNumEntry("Brightness",255); |
75 | brightness->setMaxValue( maxbright ); | 76 | brightness->setMaxValue( maxbright ); |
76 | brightness->setTickInterval( QMAX(1,maxbright/16) ); | 77 | brightness->setTickInterval( QMAX(1,maxbright/16) ); |
77 | brightness->setLineStep( QMAX(1,maxbright/16) ); | 78 | brightness->setLineStep( QMAX(1,maxbright/16) ); |
78 | brightness->setPageStep( QMAX(1,maxbright/16) ); | 79 | brightness->setPageStep( QMAX(1,maxbright/16) ); |
79 | brightness->setValue( (maxbright*255 - initbright*maxbright)/255 ); | 80 | brightness->setValue( (maxbright*255 - initbright*maxbright)/255 ); |
80 | 81 | ||
81 | connect(brightness, SIGNAL(valueChanged(int)), this, SLOT(applyBrightness())); | 82 | connect(brightness, SIGNAL(valueChanged(int)), this, SLOT(applyBrightness())); |