-rw-r--r-- | core/settings/light-and-power/light-and-power.pro | 2 | ||||
-rw-r--r-- | core/settings/light-and-power/light.cpp | 5 |
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 @@ -3,13 +3,13 @@ CONFIG += qt warn_on release DESTDIR = $(OPIEDIR)/bin HEADERS = settings.h 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 \ ../../../i18n/en/light-and-power.ts \ ../../../i18n/es/light-and-power.ts \ ../../../i18n/fr/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 @@ -42,13 +42,14 @@ #include <qlistbox.h> #include <qdir.h> #if QT_VERSION >= 300 #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 ) { // Not supported auto_brightness->hide(); @@ -66,13 +67,13 @@ LightSettings::LightSettings( QWidget* parent, const char* name, WFlags fl ) if ( interval > 3600 ) interval /= 1000; // compatibility (was millisecs) interval_suspend->setValue( interval ); 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) ); brightness->setLineStep( QMAX(1,maxbright/16) ); brightness->setPageStep( QMAX(1,maxbright/16) ); brightness->setValue( (maxbright*255 - initbright*maxbright)/255 ); |