From 9f442f5af601d1e15bb4d0509ed012e61609260d Mon Sep 17 00:00:00 2001 From: harlekin Date: Sun, 20 Oct 2002 14:37:00 +0000 Subject: reworked light and power, ac setting tab added and prepared for ipaq light sensor --- diff --git a/core/settings/light-and-power/light.cpp b/core/settings/light-and-power/light.cpp index ded358c..8721a95 100644 --- a/core/settings/light-and-power/light.cpp +++ b/core/settings/light-and-power/light.cpp @@ -17,6 +17,9 @@ ** not clear to you. ** **********************************************************************/ + +// redone by Maximilian Reiss + #include "settings.h" #include @@ -24,6 +27,7 @@ #include #include #include +#include #if defined(Q_WS_QWS) && !defined(QT_NO_COP) #include #endif @@ -38,6 +42,7 @@ #include #include #include +#include #include #include #include @@ -52,14 +57,29 @@ using namespace Opie; LightSettings::LightSettings( QWidget* parent, const char* name, WFlags fl ) : LightSettingsBase( parent, name, TRUE, fl ) { - // Not supported - auto_brightness->hide(); + + if ( ODevice::inst()->model() == Model_iPAQ_H31xx || + ODevice::inst()->model() == Model_iPAQ_H36xx || + ODevice::inst()->model() == Model_iPAQ_H37xx || + ODevice::inst()->model() == Model_iPAQ_H38xx ) { + // Not supported yet - hide until implemented + IpaqGroupBox->setEnabled( false ); + IpaqGroupBoxAC->setEnabled( false ); + LightSensorGroupBox->setEnabled( false ); + } else { + // if ipaq no need to show the sensor box + IpaqGroupBox->hide(); + IpaqGroupBoxAC->hide(); + LightSensorGroupBox->hide(); + } Config config( "qpe" ); config.setGroup( "Screensaver" ); int interval; + + // battery spinboxes interval = config.readNumEntry( "Interval_Dim", 20 ); interval_dim->setValue( interval ); interval = config.readNumEntry( "Interval_LightOff", 30 ); @@ -68,6 +88,19 @@ LightSettings::LightSettings( QWidget* parent, const char* name, WFlags fl ) if ( interval > 3600 ) interval /= 1000; // compatibility (was millisecs) interval_suspend->setValue( interval ); + // ac spinboxes + interval = config.readNumEntry( "Interval_DimAC", 20 ); + interval_dim_ac_3->setValue( interval ); + interval = config.readNumEntry( "Interval_LightOffAC", 30 ); + interval_lightoff_ac_3->setValue( interval ); + interval = config.readNumEntry( "IntervalAC", 60 ); + if ( interval > 3600 ) { + interval /= 1000; // compatibility (was millisecs) + } + interval_suspend_ac_3->setValue( interval ); + + + // battery check and slider screensaver_dim->setChecked( config.readNumEntry("Dim",1) != 0 ); screensaver_lightoff->setChecked( config.readNumEntry("LightOff",1) != 0 ); LcdOffOnly->setChecked( config.readNumEntry("LcdOffOnly",0) != 0 ); @@ -79,13 +112,45 @@ LightSettings::LightSettings( QWidget* parent, const char* name, WFlags fl ) brightness->setPageStep( QMAX(1,maxbright/16) ); brightness->setValue( (maxbright*255 - initbright*maxbright)/255 ); + // ac check and slider + screensaver_dim_ac_3->setChecked( config.readNumEntry("DimAC",1) != 0 ); + screensaver_lightoff_ac_3->setChecked( config.readNumEntry("LightOffAC",1) != 0 ); + LcdOffOnly_2_3->setChecked( config.readNumEntry("LcdOffOnlyAC",0) != 0 ); + int maxbright_ac = ODevice::inst ( )-> displayBrightnessResolution ( ); + initbright_ac = config.readNumEntry("BrightnessAC",255); + brightness_ac_3->setMaxValue( maxbright_ac ); + brightness_ac_3->setTickInterval( QMAX(1,maxbright_ac/16) ); + brightness_ac_3->setLineStep( QMAX(1,maxbright_ac/16) ); + brightness_ac_3->setPageStep( QMAX(1,maxbright_ac/16) ); + brightness_ac_3->setValue( (maxbright_ac*255 - initbright_ac*maxbright_ac)/255 ); + + // advanced settings + config.setGroup( "APM" ); + warnintervalBox->setValue( config.readNumEntry("check_interval", 10000)/1000 ); + lowSpinBox->setValue( config.readNumEntry("power_verylow", 10 ) ); + criticalSpinBox->setValue( config.readNumEntry("power_critical", 5 ) ); + + // ipaq sensor + config.setGroup( "Ipaq_light_sensor" ); + auto_brightness->setChecked( config.readNumEntry("LightSensor",1) != 0 ); + auto_brightness_ac_3->setChecked( config.readNumEntry("LightSensorAC",1) != 0 ); + LightStepSpin->setValue( config.readNumEntry("Steps", 10 ) ); + LightMinValueSlider->setValue( config.readNumEntry("MinValue", 70 ) ); + connect( LightStepSpin, SIGNAL( valueChanged( int ) ), this, SLOT( slotSliderTicks( int ) ) ) ; + LightShiftSpin->setValue( config.readNumEntry("Shift", 0 ) ); + connect(brightness, SIGNAL(valueChanged(int)), this, SLOT(applyBrightness())); + connect(brightness_ac_3, SIGNAL(valueChanged(int)), this, SLOT(applyBrightness())); } LightSettings::~LightSettings() { } +void LightSettings::slotSliderTicks( int steps ) { + LightMinValueSlider->setTickInterval( steps ); +} + static void set_fl(int bright) { QCopEnvelope e("QPE/System", "setBacklight(int)" ); @@ -102,18 +167,28 @@ void LightSettings::reject() void LightSettings::accept() { if ( qApp->focusWidget() ) - qApp->focusWidget()->clearFocus(); + qApp->focusWidget()->clearFocus(); applyBrightness(); + // bat int i_dim = (screensaver_dim->isChecked() ? interval_dim->value() : 0); int i_lightoff = (screensaver_lightoff->isChecked() ? interval_lightoff->value() : 0); int i_suspend = interval_suspend->value(); QCopEnvelope e("QPE/System", "setScreenSaverIntervals(int,int,int)" ); e << i_dim << i_lightoff << i_suspend; + // ac + int i_dim_ac = (screensaver_dim_ac_3->isChecked() ? interval_dim_ac_3->value() : 0); + int i_lightoff_ac = (screensaver_lightoff_ac_3->isChecked() ? interval_lightoff_ac_3->value() : 0); + int i_suspend_ac = interval_suspend_ac_3->value(); + QCopEnvelope e_ac("QPE/System", "setScreenSaverIntervalsAC(int,int,int)" ); + e << i_dim_ac << i_lightoff_ac << i_suspend_ac; + Config config( "qpe" ); config.setGroup( "Screensaver" ); + + // bat config.writeEntry( "Dim", (int)screensaver_dim->isChecked() ); config.writeEntry( "LightOff", (int)screensaver_lightoff->isChecked() ); config.writeEntry( "LcdOffOnly", (int)LcdOffOnly->isChecked() ); @@ -122,6 +197,41 @@ void LightSettings::accept() config.writeEntry( "Interval", interval_suspend->value() ); config.writeEntry( "Brightness", (brightness->maxValue()-brightness->value())*255/brightness->maxValue() ); + + // ac + config.writeEntry( "DimAC", (int)screensaver_dim_ac_3->isChecked() ); + config.writeEntry( "LightOffAC", (int)screensaver_lightoff_ac_3->isChecked() ); + config.writeEntry( "LcdOffOnlyAC", (int)LcdOffOnly_2_3->isChecked() ); + config.writeEntry( "Interval_DimAC", interval_dim_ac_3->value() ); + config.writeEntry( "Interval_LightOffAC", interval_lightoff_ac_3->value() ); + config.writeEntry( "IntervalAC", interval_suspend_ac_3->value() ); + config.writeEntry( "BrightnessAC", + (brightness_ac_3->maxValue() - brightness_ac_3->value())*255/brightness_ac_3->maxValue() ); + + // advanced + config.setGroup( "APM" ); + config.writeEntry( "check_interval", warnintervalBox->value()*1000 ); + config.writeEntry( "power_verylow", lowSpinBox->value() ); + config.writeEntry( "power_critical", criticalSpinBox->value() ); + QCopEnvelope e_warn("QPE/System", "reloadPowerWarnSettings()"); + + + // only make ipaq light sensor entries in config file if on an ipaq + if ( ODevice::inst()->model() == Model_iPAQ_H31xx || + ODevice::inst()->model() == Model_iPAQ_H36xx || + ODevice::inst()->model() == Model_iPAQ_H37xx || + ODevice::inst()->model() == Model_iPAQ_H38xx ) { + + // ipaq sensor + config.setGroup( "Ipaq_light_sensor" ); + + config.writeEntry( "LightSensor", (int)auto_brightness->isChecked() ); + config.writeEntry( "LightSensorAC", (int)auto_brightness_ac_3->isChecked() ); + config.writeEntry( "Steps", LightStepSpin->value() ); + config.writeEntry( "MinValue", LightMinValueSlider->value() ); + config.writeEntry( "Shift", LightShiftSpin->value() ); + } + config.write(); QDialog::accept(); @@ -129,12 +239,18 @@ void LightSettings::accept() void LightSettings::applyBrightness() { - int bright = (brightness->maxValue()-brightness->value())*255 - / brightness->maxValue(); - set_fl(bright); + // if ac is attached, set directly that sliders setting, else the "on battery" sliders setting + if ( PowerStatus::Online ) { + int bright = (brightness_ac_3->maxValue() - brightness_ac_3->value())*255 / brightness_ac_3->maxValue(); + set_fl(bright); + } else { + int bright = (brightness->maxValue()-brightness->value())*255 / brightness->maxValue(); + set_fl(bright); + } } + void LightSettings::done(int r) { QDialog::done(r); diff --git a/core/settings/light-and-power/lightsettingsbase.ui b/core/settings/light-and-power/lightsettingsbase.ui index 5e7ff45..fd85017 100644 --- a/core/settings/light-and-power/lightsettingsbase.ui +++ b/core/settings/light-and-power/lightsettingsbase.ui @@ -11,50 +11,38 @@ 0 0 - 269 - 317 + 419 + 532 caption Light and Power Settings + + sizeGripEnabled + false + layoutMargin + + layoutSpacing + margin - 7 + 3 spacing - 6 + 3 - QCheckBox - - name - auto_brightness - - - text - Adjust to environment - - - whatsThis - By sensing the ambient light where you are using your device, the screen light can be adjusted automatically. The brightness setting still affects the average brightness. - - - - QGroupBox + QTabWidget name - GroupBox3 - - - title - Power saving + TabWidget3 layoutMargin @@ -62,397 +50,1266 @@ layoutSpacing - - - margin - 11 - + + QWidget - spacing - 6 + name + tab - - QSpinBox - - name - interval_lightoff - - - suffix - seconds - - - buttonSymbols - PlusMinus - - - maxValue - 3600 - - - minValue - 10 - - - lineStep - 15 - - - - QSpinBox - - name - interval_suspend - - - suffix - seconds - - - buttonSymbols - PlusMinus - + + title + on Battery + + - maxValue - 3600 + margin + 3 - minValue - 10 + spacing + 3 - - lineStep - 15 - - - - QCheckBox - - name - screensaver_dim - - - sizePolicy - - 1 - 0 - - - - text - Dim light after - - - checked - true - - - - QSpinBox - - name - interval_dim - - - suffix - seconds - - - buttonSymbols - PlusMinus - - - maxValue - 3600 - - - minValue - 10 - - - lineStep - 15 - - - - QLabel - - name - TextLabel1_2 - - - text - Suspend after - - - - QCheckBox - - name - LcdOffOnly - - - text - Deactivate LCD only (does not suspend) - - - - QCheckBox - - name - screensaver_lightoff - - - sizePolicy - - 1 - 0 - - - - text - Light off after - - - checked - true - - - - - - QLayoutWidget - - name - Layout18 - - - layoutMargin - - - - margin - 0 - - - spacing - 6 - - - QSlider - - name - brightness - - - maxValue - 255 - - - lineStep - 16 - - - pageStep - 16 - - - orientation - Vertical - - - tickmarks - Right - - - tickInterval - 32 - - - - QLayoutWidget - - name - Layout16 - - - layoutSpacing - - + + QGroupBox + + name + GroupBox3 + - margin - 0 + enabled + true - spacing - 0 + title + General Settings + + + layoutMargin - - QLayoutWidget + + layoutSpacing + + - name - Layout10 + margin + 3 - - - margin - 0 - + + spacing + 3 + + + QLayoutWidget - spacing - 6 + name + Layout8 - - QLabel + - name - PixmapLabel1 + margin + 0 - pixmap - image0 + spacing + 6 + + QSpinBox + + name + interval_dim + + + suffix + seconds + + + buttonSymbols + PlusMinus + + + maxValue + 3600 + + + minValue + 10 + + + lineStep + 15 + + + + QCheckBox + + name + screensaver_lightoff + + + sizePolicy + + 1 + 0 + + + + text + Light off after + + + checked + true + + + + QSpinBox + + name + interval_suspend + + + suffix + seconds + + + buttonSymbols + PlusMinus + + + maxValue + 3600 + + + minValue + 10 + + + lineStep + 15 + + + + QSpinBox + + name + interval_lightoff + + + suffix + seconds + + + buttonSymbols + PlusMinus + + + maxValue + 3600 + + + minValue + 10 + + + lineStep + 15 + + + + QCheckBox + + name + screensaver_dim + + + sizePolicy + + 1 + 0 + + + + text + Dim light after + + + checked + true + + + + QLabel + + name + TextLabel1_2 + + + text + Suspend after + + + + + + QCheckBox + + name + LcdOffOnly + + + text + Deactivate LCD only (does not suspend) + + + + + + QGroupBox + + name + GroupBox9 + + + title + Backlight + + + layoutMargin + + + layoutSpacing + + + + margin + 3 + + + spacing + 3 + + + QSlider + + name + brightness + + + maxValue + 255 + + + lineStep + 16 + + + pageStep + 16 + + + orientation + Horizontal + + + tickmarks + Right + + + tickInterval + 32 + + + + QLayoutWidget + + name + Layout10 + + - scaledContents - false + margin + 0 - - - QLabel - name - TextLabel1 + spacing + 6 + + QLabel + + name + PixmapLabel2 + + + pixmap + image0 + + + scaledContents + false + + + + QLabel + + name + TextLabel4 + + + text + Off + + + + + name + Spacer2 + + + orientation + Horizontal + + + sizeType + Expanding + + + sizeHint + + 20 + 20 + + + + + QLabel + + name + TextLabel5 + + + text + Full + + + + QLabel + + name + PixmapLabel1 + + + pixmap + image1 + + + scaledContents + false + + + + + + + + QGroupBox + + name + IpaqGroupBox + + + title + iPAQ + + + layoutMargin + + + layoutSpacing + + + + margin + 3 + + + spacing + 3 + + + QCheckBox + + name + auto_brightness + + + text + Use light sensor + + + whatsThis + By sensing the ambient light where you are using your device, the screen light can be adjusted automatically. The brightness setting still affects the average brightness. + + + + + + + name + Spacer4 + + + orientation + Vertical + + + sizeType + Expanding + + + sizeHint + + 20 + 20 + + + + + + + QWidget + + name + tab + + + title + on AC + + + + margin + 3 + + + spacing + 3 + + + QGroupBox + + name + GroupBox4 + + + enabled + true + + + title + General Settings + + + layoutMargin + + + layoutSpacing + + + + margin + 3 + + + spacing + 3 + + + QLayoutWidget + + name + Layout9_3 + + - text - Bright - - - - - name - Spacer3 + margin + 0 - orientation - Horizontal + spacing + 6 + + QLabel + + name + TextLabel1_2_2_3 + + + text + Suspend after + + + + QSpinBox + + name + interval_dim_ac_3 + + + suffix + seconds + + + buttonSymbols + PlusMinus + + + maxValue + 3600 + + + minValue + 10 + + + lineStep + 15 + + + + QSpinBox + + name + interval_suspend_ac_3 + + + suffix + seconds + + + buttonSymbols + PlusMinus + + + maxValue + 3600 + + + minValue + 10 + + + lineStep + 15 + + + + QSpinBox + + name + interval_lightoff_ac_3 + + + suffix + seconds + + + buttonSymbols + PlusMinus + + + maxValue + 3600 + + + minValue + 10 + + + lineStep + 15 + + + + QCheckBox + + name + screensaver_lightoff_ac_3 + + + sizePolicy + + 1 + 0 + + + + text + Light off after + + + checked + true + + + + QCheckBox + + name + screensaver_dim_ac_3 + + + sizePolicy + + 1 + 0 + + + + text + Dim light after + + + checked + true + + + + + + QCheckBox + + name + LcdOffOnly_2_3 + + + text + Deactivate LCD only (does not suspend) + + + + + + QGroupBox + + name + GroupBox8 + + + title + Backlight + + + layoutMargin + + + layoutSpacing + + + + margin + 3 + + + spacing + 3 + + + QSlider + + name + brightness_ac_3 + + + maxValue + 255 + + + lineStep + 16 + + + pageStep + 16 + + + orientation + Horizontal + + + tickmarks + Right + + + tickInterval + 32 + + + + QLayoutWidget + + name + Layout20 + + - sizeType - Expanding + margin + 0 - - sizeHint - - 20 - 20 - + + spacing + 6 - - - - - QLabel + + QLabel + + name + PixmapLabel2_2_3 + + + pixmap + image2 + + + scaledContents + false + + + + QLabel + + name + TextLabel6 + + + text + Off + + + + + name + Spacer3 + + + orientation + Horizontal + + + sizeType + Expanding + + + sizeHint + + 20 + 20 + + + + + QLabel + + name + TextLabel7 + + + text + Full + + + + QLabel + + name + PixmapLabel1_2_3 + + + pixmap + image1 + + + scaledContents + false + + + + + + + + QGroupBox + + name + IpaqGroupBoxAC + + + title + iPAQ + + + layoutMargin + + + layoutSpacing + + - name - TextLabel3 + margin + 3 - sizePolicy - - 5 - 7 - + spacing + 3 + + QCheckBox + + name + auto_brightness_ac_3 + + + text + Use light sensor + + + whatsThis + By sensing the ambient light where you are using your device, the screen light can be adjusted automatically. The brightness setting still affects the average brightness. + + + + + + + name + Spacer5 + + + orientation + Vertical + + + sizeType + Expanding + + + sizeHint + + 20 + 20 + + + + + + + QWidget + + name + tab + + + title + Advanced Settings + + + + margin + 3 + + + spacing + 3 + + + QGroupBox + + name + GroupBox5 + + + title + Warnings + + + layoutMargin + + + layoutSpacing + + - text - <blockquote>The brighter the screen light, the more battery power is used.</blockquote> + margin + 4 - - - QLayoutWidget - name - Layout9 + spacing + 3 - + + QLayoutWidget - margin - 0 + name + Layout18 - - spacing - 6 - - - QLabel + - name - PixmapLabel2 + margin + 0 - pixmap - image1 + spacing + 6 + + QLabel + + name + TextLabel1 + + + text + Low power warning +interval + + + alignment + WordBreak|AlignVCenter|AlignLeft + + + wordwrap + + + + QSpinBox + + name + lowSpinBox + + + suffix + % + + + maxValue + 80 + + + minValue + 2 + + + whatsThis + At what battery level should the low power warning pop up + + + + QSpinBox + + name + warnintervalBox + + + suffix + seconds + + + maxValue + 60 + + + minValue + 5 + + + whatsThis + how often should be checked for low power. This determines the rate popups occure in low power situations + + + + QSpinBox + + name + criticalSpinBox + + + prefix + + + + suffix + % + + + maxValue + 80 + + + minValue + 2 + + + whatsThis + At what battery level should the critical power warning pop up + + + + QLabel + + name + TextLabel2 + + + text + very low battery +warning at + + + + QLabel + + name + TextLabel3 + + + text + critical power +warning at + + + + + + + + QGroupBox + + name + LightSensorGroupBox + + + title + iPAQ Light Sensor (127 steps) + + + layoutMargin + + + layoutSpacing + + + + margin + 3 + + + spacing + 3 + + + QLayoutWidget + + name + Layout7 + + - scaledContents - false + margin + 0 - - - QLabel - name - TextLabel2 + spacing + 6 + + QLabel + + name + TextLabel9 + + + text + Steps + + + + QSpinBox + + name + LightStepSpin + + + maxValue + 126 + + + minValue + 1 + + + whatsThis + How many different steps should be handled by the light sensor. Values between 1 and 126 are allowed. + + + + + + QLabel + + name + TextLabel10 + + + text + Minimum value to turn display on + + + + QLayoutWidget + + name + Layout9 + + - text - Off + margin + 0 - alignment - AlignVCenter|AlignLeft - - - vAlign - - - - - name - Spacer2 + spacing + 6 + + QLabel + + name + PixmapLabel2_2 + + + pixmap + image0 + + + scaledContents + false + + + + QSlider + + name + LightMinValueSlider + + + maxValue + 127 + + + orientation + Horizontal + + + tickmarks + Right + + + + QLabel + + name + PixmapLabel1_2 + + + pixmap + image1 + + + scaledContents + false + + + + + + QLayoutWidget + + name + Layout8 + + - orientation - Horizontal + margin + 0 - sizeType - Expanding - - - sizeHint - - 20 - 20 - + spacing + 6 - - - - - - + + QLabel + + name + TextLabel11 + + + text + Shift + + + + QSpinBox + + name + LightShiftSpin + + + maxValue + 126 + + + + + + + + + name + Spacer1 + + + orientation + Vertical + + + sizeType + Expanding + + + sizeHint + + 20 + 20 + + + + + image0 - 789c6d8ec10ac2300c86ef7b8ad0ff36a4730777111f41f1288887b4b3e8610a3a0f22bebb6dd3d54d0ca5cdffe54f9aaaa4dd764d6555dc7beecf96ec896f54b68fae7bee0fab57a1ea86fc5950ad6685d2646973bd1c43ce3ec73c46903648e79a5624443a27d20cd2b9382704747e124382f11a7c5e30b364b957b331866331b3800c38f70282121c7c628367c098c1e0eb03121ccd4b46fcb0f80b26bb4833987f76b6d6f274de5fe6a1a031d30969f55e161fe4715f7b + 789cd3d7528808f055d0d2e72a2e492cc94c5648ce482c52d04a29cdcdad8c8eb5ade6523234530022130543251d2e253d856405bffcbc54105b19c856360003103711c4354b324b364b06719340dcb434b36488ac1e1a2020a6acac8c2ea60cc54862606ea232b218541b5810452c3111432c510f550c22886a1e482c115d0c2c88e6168818babaa4a42462c48082cae8e68102011a06b5d65c004336518f image1 + 789c6d8ec10ac2300c86ef7b8ad0ff36a4730777111f41f1288887b4b3e8610a3a0f22bebb6dd3d54d0ca5cdffe54f9aaaa4dd764d6555dc7beecf96ec896f54b68fae7bee0fab57a1ea86fc5950ad6685d2646973bd1c43ce3ec73c46903648e79a5624443a27d20cd2b9382704747e124382f11a7c5e30b364b957b331866331b3800c38f70282121c7c628367c098c1e0eb03121ccd4b46fcb0f80b26bb4833987f76b6d6f274de5fe6a1a031d30969f55e161fe4715f7b + + + image2 789cd3d7528808f055d0d2e72a2e492cc94c5648ce482c52d04a29cdcdad8c8eb5ade6523234530022130543251d2e253d856405bffcbc54105b19c856360003103711c4354b344b314b04719340dcb434b31488ac1e1a2020a6acac8c2ea60cc54862606ea232b218541b5810452c3111432c510f550c22886a1e482c115d0c2c88e6168818babaa4a42462c48082cae8e68102011a06b5d65c0041d3518e diff --git a/core/settings/light-and-power/opie-light-and-power.control b/core/settings/light-and-power/opie-light-and-power.control index c5e3a83..0bc128d 100644 --- a/core/settings/light-and-power/opie-light-and-power.control +++ b/core/settings/light-and-power/opie-light-and-power.control @@ -1,7 +1,7 @@ Files: bin/light-and-power apps/Settings/Light.desktop pics/lightandpower Priority: optional Section: opie/settings -Maintainer: Warwick Allison +Maintainer: Maximilian Reiss Architecture: arm Version: $QPE_VERSION-$SUB_VERSION Depends: opie-base ($QPE_VERSION) diff --git a/core/settings/light-and-power/settings.h b/core/settings/light-and-power/settings.h index 27c09a7..77f90d6 100644 --- a/core/settings/light-and-power/settings.h +++ b/core/settings/light-and-power/settings.h @@ -21,13 +21,13 @@ #define SETTINGS_H -#include +#include #include #include "lightsettingsbase.h" class LightSettings : public LightSettingsBase -{ +{ Q_OBJECT public: @@ -37,14 +37,16 @@ public: protected: void accept(); void reject(); - + void done ( int r ); private slots: void applyBrightness(); + void slotSliderTicks( int steps ); private: int initbright; + int initbright_ac; }; -- cgit v0.9.0.2