summaryrefslogtreecommitdiff
path: root/core/settings/light-and-power
authorsandman <sandman>2002-09-06 19:28:46 (UTC)
committer sandman <sandman>2002-09-06 19:28:46 (UTC)
commit088a233d52f2b06b6f478e73776eb2b430b2a1a5 (patch) (side-by-side diff)
tree5316a2ea38418a0dd00977895f73ef06434eb9e5 /core/settings/light-and-power
parent61b8be0405b46896160afaf7f4a2082527f01f58 (diff)
downloadopie-088a233d52f2b06b6f478e73776eb2b430b2a1a5.zip
opie-088a233d52f2b06b6f478e73776eb2b430b2a1a5.tar.gz
opie-088a233d52f2b06b6f478e73776eb2b430b2a1a5.tar.bz2
Changes to use the new ODevice interface for LCD brightness control
Diffstat (limited to 'core/settings/light-and-power') (more/less context) (ignore whitespace changes)
-rw-r--r--core/settings/light-and-power/light-and-power.pro2
-rw-r--r--core/settings/light-and-power/light.cpp5
2 files changed, 4 insertions, 3 deletions
diff --git a/core/settings/light-and-power/light-and-power.pro b/core/settings/light-and-power/light-and-power.pro
index 9d2452c..43395bf 100644
--- a/core/settings/light-and-power/light-and-power.pro
+++ b/core/settings/light-and-power/light-and-power.pro
@@ -6,7 +6,7 @@ SOURCES = light.cpp main.cpp
INTERFACES = lightsettingsbase.ui
INCLUDEPATH += $(OPIEDIR)/include
DEPENDPATH += ../$(OPIEDIR)/include
-LIBS += -lqpe
+LIBS += -lqpe -lopie
TARGET = light-and-power
TRANSLATIONS = ../../../i18n/de/light-and-power.ts \
diff --git a/core/settings/light-and-power/light.cpp b/core/settings/light-and-power/light.cpp
index e959603..fbea905 100644
--- a/core/settings/light-and-power/light.cpp
+++ b/core/settings/light-and-power/light.cpp
@@ -45,7 +45,8 @@
#include <qstylefactory.h>
#endif
-extern int qpe_sysBrightnessSteps();
+#include <opie/odevice.h>
+
LightSettings::LightSettings( QWidget* parent, const char* name, WFlags fl )
: LightSettingsBase( parent, name, TRUE, fl )
@@ -69,7 +70,7 @@ LightSettings::LightSettings( QWidget* parent, const char* name, WFlags fl )
screensaver_dim->setChecked( config.readNumEntry("Dim",1) != 0 );
screensaver_lightoff->setChecked( config.readNumEntry("LightOff",1) != 0 );
LcdOffOnly->setChecked( config.readNumEntry("LcdOffOnly",0) != 0 );
- int maxbright = qpe_sysBrightnessSteps();
+ int maxbright = ODevice::inst ( )-> displayBrightnessResolution ( );
initbright = config.readNumEntry("Brightness",255);
brightness->setMaxValue( maxbright );
brightness->setTickInterval( QMAX(1,maxbright/16) );