Applets
notificationwidget.h
Go to the documentation of this file.00001 /*************************************************************************** 00002 * notificationwidget.h * 00003 * * 00004 * Copyright (C) 2008 Dmitry Suzdalev <dimsuz@gmail.com> * 00005 * Copyright (C) 2008 Rob Scheepmaker <r.scheepmaker@student.utwente.nl> * 00006 * Copyright (C) 2008 Jason Stubbs <jasonbstubbs@gmail.com> * 00007 * * 00008 * This program is free software; you can redistribute it and/or modify * 00009 * it under the terms of the GNU Library General Public License as * 00010 * published by the Free Software Foundation; either version 2 of the * 00011 * License, or (at your option) any later version. * 00012 * * 00013 * This program is distributed in the hope that it will be useful, * 00014 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 00015 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 00016 * GNU Library General Public License for more details. * 00017 * * 00018 * You should have received a copy of the GNU Library General Public * 00019 * License along with this library; if not, write to the * 00020 * Free Software Foundation, Inc., * 00021 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA . * 00022 ***************************************************************************/ 00023 00024 #ifndef NOTIFICATIONITEM_H 00025 #define NOTIFICATIONITEM_H 00026 00027 #include <QGraphicsWidget> 00028 00029 #include "../core/notification.h" 00030 00031 namespace Plasma 00032 { 00033 class ExtenderItem; 00034 } 00035 00036 class NotificationWidgetPrivate; 00037 00041 class NotificationWidget : public QGraphicsWidget 00042 { 00043 Q_OBJECT 00044 00045 public: 00046 NotificationWidget(SystemTray::Notification *notification, Plasma::ExtenderItem *parent); 00047 ~NotificationWidget(); 00048 00049 protected: 00050 void resizeEvent(QGraphicsSceneResizeEvent *event); 00051 00052 private: 00053 NotificationWidgetPrivate* const d; 00054 00055 Q_PRIVATE_SLOT(d, void updateNotification()) 00056 Q_PRIVATE_SLOT(d, void destroy()) 00057 }; 00058 00059 #endif // NOTIFICATIONWIDGET_H