![]() |
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 SHUTDOWNBUSINESSLOGIC_H 00020 #define SHUTDOWNBUSINESSLOGIC_H 00021 00022 #ifdef HAVE_QMSYSTEM 00023 #include <qmsystemstate.h> 00024 #endif 00025 00026 #include <QDBusAbstractAdaptor> 00027 #include <QObject> 00028 00029 class ShutdownUI; 00030 00043 class ShutdownBusinessLogic : public QObject 00044 { 00045 Q_OBJECT 00046 00047 public: 00048 ShutdownBusinessLogic(QObject *parent = 0); 00049 virtual ~ShutdownBusinessLogic (); 00050 00051 void showUI(QString text1 = QString (""), QString text2 = QString (""), int timeout = 2000); 00052 00053 public slots: 00054 #ifdef HAVE_QMSYSTEM 00055 00058 void systemStateChanged (MeeGo::QmSystemState::StateIndication what); 00059 #endif 00060 00061 private: 00062 void thermalShutdown(); 00063 void batteryShutdown(); 00064 void shutdownDeniedUSB(); 00065 void createAndPublishNotification(const QString &type, const QString &summary, const QString &body); 00066 00067 private: 00069 ShutdownUI *shutdownUi; 00070 00071 #ifdef HAVE_QMSYSTEM 00072 MeeGo::QmSystemState *m_State; 00073 #endif 00074 00075 #ifdef UNIT_TEST 00076 friend class Ft_ShutdownBusinessLogic; 00077 friend class Ut_ShutdownBusinessLogic; 00078 #endif 00079 }; 00080 00081 class ShutdownBusinessLogicAdaptor : public QDBusAbstractAdaptor 00082 { 00083 Q_OBJECT 00084 Q_CLASSINFO("D-Bus Interface", "com.nokia.systemui.shutdownui") 00085 00086 public: 00087 ShutdownBusinessLogicAdaptor ( 00088 QObject *parent, 00089 ShutdownBusinessLogic *logic); 00090 00091 public slots: 00092 Q_NOREPLY void showScreen (QString text1, QString text2, int timeout); 00093 00094 private: 00095 ShutdownBusinessLogic *shutdownBusinessLogic; 00096 #ifdef UNIT_TEST 00097 friend class Ft_ShutdownBusinessLogic; 00098 friend class Ut_ShutdownBusinessLogic; 00099 #endif 00100 }; 00101 00102 #endif
Copyright © 2011 Nokia Corporation | Generated on Tue Aug 30 2011 16:38:12 Doxygen 1.7.1 |
MeeGo Touch |