Hi Friends,
I am trying to use the QWSScreenSaver class for my embedded application.
1. I subclass 'QWSScreenSaver' and implement 'save' and 'restore' method.
2. I assign object of the above created class in main widow constructor using QWSServer::setScreenSaver ( &objScreenSaver)
3. I am able to switch the backlight off with "QWSServer::screenSaverActivate(true)" in the save method.
4. I am not able restore the backlight in 'restore' method.
code of my application.
/***Code begins here****/
file.h
class eSSLScreenSaverublic QWSScreenSaver
{
int timings[4];
public:
eSSLScreenSaver();
void restore();
bool save(int level);
};
file.cpp
void eSSLScreenSaver::restore()
{
printf("called restore\n");
if(!QWSServer::screenSaverActive())
{
// QWSServer::screenSaverActivate(false);
printf("Inside restore\n");
QWSServer::sendKeyEvent(-1,Qt::Key_F35,Qt::NoModifier,0,0);
// QWSServer::Active;
}
}
bool eSSLScreenSaver::save(int level)
{
printf("called level %d\n",level);
QWSServer::screenSaverActivate(true);
}
//***Code ends here****/
Kindly correct me if I am wrong in understanding or implementing the concept.
Ratheendran
Bookmarks