author | sandman <sandman> | 2002-10-28 04:48:35 (UTC) |
---|---|---|
committer | sandman <sandman> | 2002-10-28 04:48:35 (UTC) |
commit | cb687974f9e97c0ce6117b0ac4551ad4d4342b6a (patch) (side-by-side diff) | |
tree | 3128de5e3647a786bcc47a5fb14af06ba65f2a09 /core/launcher/screensaver.h | |
parent | f3c9e44d9d694a0a803fb6a7d79cfa8d173b9864 (diff) | |
download | opie-cb687974f9e97c0ce6117b0ac4551ad4d4342b6a.zip opie-cb687974f9e97c0ce6117b0ac4551ad4d4342b6a.tar.gz opie-cb687974f9e97c0ce6117b0ac4551ad4d4342b6a.tar.bz2 |
- moved the QPEScreenSaver to screensaver.cpp/.h and renamed the class to
OpieScreenSaver
- (hopefully) fixed all outstanding bugs regarding the new on batt/on ac
handling
- first (primitive) version of light sensor control (but it works)
-rw-r--r-- | core/launcher/screensaver.h | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/core/launcher/screensaver.h b/core/launcher/screensaver.h new file mode 100644 index 0000000..9126f33 --- a/dev/null +++ b/core/launcher/screensaver.h @@ -0,0 +1,61 @@ +#ifndef __LAUNCHER_SCREENSAVER_H__ +#define __LAUNCHER_SCREENSAVER_H__ + +#include <qwindowsystem_qws.h> +#include <qobject.h> + +#include <qpe/power.h> + +class OpieScreenSaver : public QObject, public QWSScreenSaver +{ +public: + OpieScreenSaver ( ); + + void restore ( ); + bool save ( int level ); + + void setIntervals( int i1, int i2, int i3 ); + void setIntervalsAC( int i1, int i2, int i3 ); + + void setInterval ( int interval ); + + void setMode ( int mode ); + + void setBacklight ( int bright ); + void setDisplayState ( bool on ); + + void powerStatusChanged ( PowerStatus ps ); + +private: + void setBacklightInternal ( int bright ); + +protected: + virtual void timerEvent ( QTimerEvent * ); + +private: + int m_disable_suspend; + bool m_enable_dim; + bool m_enable_lightoff; + bool m_enable_suspend; + bool m_onlylcdoff; + + bool m_enable_dim_ac; + bool m_enable_lightoff_ac; + bool m_enable_suspend_ac; + bool m_onlylcdoff_ac; + + bool m_use_light_sensor; + int m_backlight_sensor; + + bool m_lcd_status; + + int m_backlight_normal; + int m_backlight_current; + bool m_backlight_forcedoff; + + bool m_on_ac; + + int m_level; +}; + +#endif |