| Home · All Classes · Main Classes · Deprecated |
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 libmeegotouch. 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 00020 #ifndef MNOTIFICATION_H_ 00021 #define MNOTIFICATION_H_ 00022 00023 #include <MExport> 00024 #include <QDBusArgument> 00025 #include <mremoteaction.h> 00026 00027 class MNotificationPrivate; 00028 class MNotificationGroup; 00029 class QString; 00030 00092 class M_CORE_EXPORT MNotification : public QObject 00093 { 00094 Q_OBJECT 00095 00100 Q_PROPERTY(QString summary READ summary WRITE setSummary) 00101 00102 00106 Q_PROPERTY(QString body READ body WRITE setBody) 00107 00112 Q_PROPERTY(QString image READ image WRITE setImage) 00113 00118 Q_PROPERTY(uint count READ count WRITE setCount) 00119 00120 public: 00125 00126 static const QString DeviceEvent; 00128 static const QString DeviceAddedEvent; 00130 static const QString DeviceErrorEvent; 00132 static const QString DeviceRemovedEvent; 00134 static const QString EmailEvent; 00136 static const QString EmailArrivedEvent; 00138 static const QString EmailBouncedEvent; 00140 static const QString ImEvent; 00142 static const QString ImErrorEvent; 00144 static const QString ImReceivedEvent; 00146 static const QString NetworkEvent; 00148 static const QString NetworkConnectedEvent; 00150 static const QString NetworkDisconnectedEvent; 00152 static const QString NetworkErrorEvent; 00154 static const QString PresenceEvent; 00156 static const QString PresenceOfflineEvent; 00158 static const QString PresenceOnlineEvent; 00160 static const QString TransferEvent; 00162 static const QString TransferCompleteEvent; 00164 static const QString TransferErrorEvent; 00166 static const QString MessageEvent; 00168 static const QString MessageArrivedEvent; 00169 00180 explicit MNotification(const QString &eventType, const QString &summary = QString(), const QString &body = QString()); 00181 00185 virtual ~MNotification(); 00186 00193 void setGroup(const MNotificationGroup &group); 00194 00200 QString eventType() const; 00201 00207 void setSummary(const QString &summary); 00208 00214 QString summary() const; 00215 00221 void setBody(const QString &body); 00222 00228 QString body() const; 00229 00237 void setImage(const QString &image); 00238 00244 QString image() const; 00245 00251 void setAction(const MRemoteAction &action); 00252 00260 void setCount(uint count); 00261 00267 uint count() const; 00268 00277 virtual bool publish(); 00278 00284 virtual bool remove(); 00285 00291 bool isPublished() const; 00292 00300 static QList<MNotification *> notifications(); 00301 00303 00308 MNotification(); 00309 00317 explicit MNotification(const MNotification ¬ification); 00318 00319 friend QDBusArgument &operator<<(QDBusArgument &, const MNotification &); 00320 friend const QDBusArgument &operator>>(const QDBusArgument &, MNotification &); 00321 MNotification &operator=(const MNotification &); 00322 00323 protected: 00325 MNotificationPrivate *d_ptr; 00326 00331 MNotification(MNotificationPrivate &dd); 00332 00340 explicit MNotification(uint id); 00341 00343 uint id() const; 00344 00350 void setEventType(const QString &eventType); 00352 00353 Q_DECLARE_PRIVATE(MNotification) 00354 }; 00355 00356 Q_DECLARE_METATYPE(MNotification) 00357 00358 #endif /* MNOTIFICATION_H_ */
| Copyright © 2010 Nokia Corporation | Generated on Thu Nov 4 2010 18:14:21 (PDT) Doxygen 1.7.1 |
MeeGo Touch |