QWSScreenSaver Class

The QWSScreenSaver class is a base class for screensavers in Qt for Embedded Linux. 更多...

头: #include <QWSScreenSaver>

公共函数

virtual ~QWSScreenSaver ()
virtual void restore () = 0
virtual bool save (int level ) = 0

详细描述

The QWSScreenSaver class is a base class for screensavers in Qt for Embedded Linux.

When running Qt for Embedded Linux applications, it is the server application that installs and controls the screensaver. Qt for Embedded Linux supports multilevel screen saving; i.e., it is possible to specify several different levels of screen responsiveness. For example, you can choose to first turn off the light before you fully activate the screensaver.

Note that there exists no default screensaver implementation.

To create a custom screensaver, derive from this class and reimplement the restore () 和 save () functions. These functions are called whenever the screensaver is activated or deactivated, respectively. Once an instance of your custom screensaver is created, you can use the QWSServer::setScreenSaver () function to install it.

另请参阅 QWSServer , QScreen ,和 Qt for Embedded Linux .

成员函数文档编制

[虚拟] QWSScreenSaver:: ~QWSScreenSaver ()

Reimplement this function to destroy the screensaver.

[pure virtual] void QWSScreenSaver:: restore ()

Implement this function to deactivate the screensaver, restoring the previously saved screen.

另请参阅 save () 和 QWSServer::screenSaverActivate ().

[pure virtual] bool QWSScreenSaver:: save ( int level )

Implement this function to activate the screensaver, saving the current screen.

Qt for Embedded Linux supports multilevel screen saving; i.e., it is possible to specify several different levels of screen responsiveness. For example, you can choose to first turn off the light before you fully activate the screensaver. Use the QWSServer::setScreenSaverIntervals () to specify the time intervals between the different levels.

This function should return true if the screensaver successfully enters the given level ; otherwise it should return false.

另请参阅 restore () 和 QWSServer::screenSaverActivate ().