Qt 4.8
Public Functions | List of all members
QWSScreenSaver Class Referenceabstract

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

#include <qwindowsystem_qws.h>

Public Functions

virtual void restore ()=0
 Implement this function to deactivate the screensaver, restoring the previously saved screen. More...
 
virtual bool save (int level)=0
 Implement this function to activate the screensaver, saving the current screen. More...
 
virtual ~QWSScreenSaver ()
 Reimplement this function to destroy the screensaver. More...
 

Detailed Description

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() and 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.

See also
QWSServer, QScreen, {Qt for Embedded Linux}

Definition at line 85 of file qwindowsystem_qws.h.

Constructors and Destructors

◆ ~QWSScreenSaver()

QWSScreenSaver::~QWSScreenSaver ( )
virtual

Reimplement this function to destroy the screensaver.

Definition at line 119 of file qwindowsystem_qws.cpp.

120 {
121 }

Functions

◆ restore()

QWSScreenSaver::restore ( )
pure virtual

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

See also
save(), QWSServer::screenSaverActivate()

◆ save()

QWSScreenSaver::save ( int  level)
pure virtual

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.

See also
restore(), QWSServer::screenSaverActivate()

The documentation for this class was generated from the following files: