-rw-r--r-- | core/settings/light-and-power/light.cpp | 5 | ||||
-rw-r--r-- | core/settings/light-and-power/settings.h | 2 |
2 files changed, 7 insertions, 0 deletions
diff --git a/core/settings/light-and-power/light.cpp b/core/settings/light-and-power/light.cpp index 960a165..b56ae11 100644 --- a/core/settings/light-and-power/light.cpp +++ b/core/settings/light-and-power/light.cpp @@ -120,16 +120,21 @@ void LightSettings::accept() config.writeEntry( "Interval", interval_suspend->value() ); config.writeEntry( "Brightness", (brightness->maxValue()-brightness->value())*255/brightness->maxValue() ); config.write(); QDialog::accept(); } void LightSettings::applyBrightness() { int bright = (brightness->maxValue()-brightness->value())*255 / brightness->maxValue(); set_fl(bright); } +void LightSettings::done(int r) +{ + QDialog::done(r); + close ( ); +} diff --git a/core/settings/light-and-power/settings.h b/core/settings/light-and-power/settings.h index cec08e3..27c09a7 100644 --- a/core/settings/light-and-power/settings.h +++ b/core/settings/light-and-power/settings.h @@ -25,26 +25,28 @@ #include <qasciidict.h> #include "lightsettingsbase.h" class LightSettings : public LightSettingsBase { Q_OBJECT public: LightSettings( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); ~LightSettings(); protected: void accept(); void reject(); + void done ( int r ); + private slots: void applyBrightness(); private: int initbright; }; #endif // SETTINGS_H |