![]() |
Home · All Namespaces · All Classes |
00001 /**************************************************************************** 00002 ** 00003 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary (-ies). 00004 ** All rights reserved. 00005 ** Contact: Nokia Corporation (directui@nokia.com) 00006 ** 00007 ** This file is part of systemui. 00008 ** 00009 ** If you have questions regarding the use of this file, please contact 00010 ** Nokia at directui@nokia.com. 00011 ** 00012 ** This library is free software; you can redistribute it and/or 00013 ** modify it under the terms of the GNU Lesser General Public 00014 ** License version 2.1 as published by the Free Software Foundation 00015 ** and appearing in the file LICENSE.LGPL included in the packaging 00016 ** of this file. 00017 ** 00018 ****************************************************************************/ 00019 #ifndef LOWBATTERYNOTIFIER_H 00020 #define LOWBATTERYNOTIFIER_H 00021 00022 #include <QObject> 00023 #include <QTime> 00024 00025 #ifdef HAVE_QMSYSTEM 00026 #include <qmdisplaystate.h> 00027 #endif 00028 00029 class QTimer; 00030 00035 class LowBatteryNotifier : public QObject { 00036 Q_OBJECT 00037 00038 public: 00042 LowBatteryNotifier(QObject *parent = NULL); 00043 00047 virtual ~LowBatteryNotifier(); 00048 00054 void setTouchScreenLockActive(bool active); 00055 00056 public slots: 00058 void sendLowBatteryAlert(); 00059 00060 private slots: 00062 void setNotificationInterval(); 00063 00064 signals: 00066 void lowBatteryAlert(); 00067 00068 private: 00069 #ifdef HAVE_QMSYSTEM 00070 00071 MeeGo::QmDisplayState *displayState; 00072 #endif 00073 00075 QTimer *notificationTimer; 00076 00078 QTime previousNotificationTime; 00079 00081 bool deviceInactive; 00082 00084 bool touchScreenLockActive; 00085 00086 #ifdef UNIT_TEST 00087 friend class Ut_LowBatteryNotifier; 00088 #endif 00089 }; 00090 #endif
Copyright © 2011 Nokia Corporation | Generated on Tue Aug 30 2011 16:38:12 Doxygen 1.7.1 |
MeeGo Touch |