Results 1 to 3 of 3

Thread: need help in restore backlight for LCD after QWSServer::screenSaverActivate(true);

  1. #1
    Join Date
    Nov 2009
    Posts
    60
    Thanks
    3
    Qt products
    Qt/Embedded
    Platforms
    Unix/X11

    Default need help in restore backlight for LCD after QWSServer::screenSaverActivate(true);

    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

  2. #2
    Join Date
    Nov 2009
    Posts
    60
    Thanks
    3
    Qt products
    Qt/Embedded
    Platforms
    Unix/X11

    Default Re: need help in restore backlight for LCD after QWSServer::screenSaverActivate(true

    Hi Friends,

    can any one show me example of QWSScreenSaver usage. I mean implementation.

    Ratheendran

  3. #3
    Join Date
    Jun 2011
    Location
    Porto Alegre, Brazil
    Posts
    482
    Thanks
    165
    Thanked 2 Times in 2 Posts
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows

    Default Re: need help in restore backlight for LCD after QWSServer::screenSaverActivate(true

    Well I'ld be very glad to have such an example as well In fact, if Ratheendrans could figure out and solve his problem, it would be nice for him to give us a feedback on his work...
    May the Lord be with you. Always.

Similar Threads

  1. Implementing Keys : 1, a, b, c in QWSServer::Keypad
    By ramsarvan in forum Qt Programming
    Replies: 1
    Last Post: 18th May 2011, 11:59
  2. Is QWSServer obsolete now?
    By hybrid_snyper in forum Qt for Embedded and Mobile
    Replies: 2
    Last Post: 20th October 2009, 16:05
  3. Problem with QWSServer::sendKeyEvent, how to use it?
    By webquinty in forum Qt Programming
    Replies: 2
    Last Post: 8th July 2009, 14:14
  4. QWSServer error
    By heraldx in forum Qt for Embedded and Mobile
    Replies: 1
    Last Post: 3rd July 2009, 12:51
  5. BackLight of a Button
    By anafor2004 in forum Newbie
    Replies: 1
    Last Post: 21st January 2008, 16:55

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.