1 /**************************************************************************
4 Copyright (C) 2010-2011 Heli Hyvättinen
6 This file is free software: you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation, either version 2 of the License, or
9 (at your option) any later version.
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this program. If not, see <http://www.gnu.org/licenses/>.
19 **************************************************************************/
25 #ifndef SCREENLITKEEPER_H
26 #define SCREENLITKEEPER_H
29 #include <QSystemScreenSaver>
30 using namespace QtMobility;
33 /*! Allows keeping the sreen lit by disabling the screensaver
35 Works at least on N900.
36 The sreen can be set to be kept lit or not.
37 To use this class, you must have the following lines in your .pro file:
39 MOBILITY += systeminfo
41 @author Heli Hyvättinen
47 class ScreenLitKeeper : public QObject
51 explicit ScreenLitKeeper(QObject *parent = 0);
57 Sets whether the screen is to be kept lit
58 @param keepLit true for keeping lit, false for allowing blanking
61 void keepScreenLit(bool keepLit);
64 QSystemScreenSaver * p_screensaver_;
69 #endif // SCREENLITKEEPER_H