00001 /************************************************************************** 00002 ScreenLitKeeper 00003 00004 Copyright (C) 2010 Heli Hyvättinen 00005 00006 This file is free software: you can redistribute it and/or modify 00007 it under the terms of the GNU General Public License as published by 00008 the Free Software Foundation, either version 3 of the License, or 00009 (at your option) any later version. 00010 00011 This program is distributed in the hope that it will be useful, 00012 but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00014 GNU General Public License for more details. 00015 00016 You should have received a copy of the GNU General Public License 00017 along with this program. If not, see <http://www.gnu.org/licenses/>. 00018 00019 **************************************************************************/ 00020 00021 00022 00023 00024 00025 #ifndef SCREENLITKEEPER_H 00026 #define SCREENLITKEEPER_H 00027 00028 #include <QObject> 00029 #include <QSystemScreenSaver> 00030 using namespace QtMobility; 00031 00032 00047 class ScreenLitKeeper : public QObject 00048 { 00049 Q_OBJECT 00050 public: 00051 explicit ScreenLitKeeper(QObject *parent = 0); 00052 00053 signals: 00054 00055 public slots: 00061 void keepScreenLit(bool keepLit); 00062 00063 private: 00064 QSystemScreenSaver * p_screensaver_; 00065 bool isKeptLit_; 00066 00067 }; 00068 00069 #endif // SCREENLITKEEPER_H