1
/***************************************************************************
4
* Copyright (C) 2008 Jason Stubbs <jasonbstubbs@gmail.com> *
5
* Copyright (C) 2010 Marco Martin <notmart@gmail.com> *
7
* This program is free software; you can redistribute it and/or modify *
8
* it under the terms of the GNU General Public License as published by *
9
* the Free Software Foundation; either version 2 of the License, or *
10
* (at your option) any later version. *
12
* This program is distributed in the hope that it will be useful, *
13
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
14
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
15
* GNU General Public License for more details. *
17
* You should have received a copy of the GNU General Public License *
18
* along with this program; if not, write to the *
19
* Free Software Foundation, Inc., *
20
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA . *
21
***************************************************************************/
23
#ifndef NOTIFICATIONS_H
24
#define NOTIFICATIONS_H
26
#include <plasma/popupapplet.h>
28
#include "ui_notificationsconfig.h"
38
class NotificationWidget;
43
class JobTotalsWidget;
46
class NotificationGroup;
47
class NotificationStack;
50
class Notifications : public Plasma::PopupApplet
55
explicit Notifications(QObject *parent, const QVariantList &arguments = QVariantList());
59
Manager *manager() const;
62
void createConfigurationInterface(KConfigDialog *parent);
63
void initExtenderItem(Plasma::ExtenderItem *extenderItem);
66
void popupEvent(bool show);
69
void configAccepted();
70
void addNotification(Notification *notification);
71
void addJob(Job *job);
72
void finishJob(Job *job);
73
void open(const QString &url);
74
void syncNotificationBarNeeded();
77
void createJobGroups();
80
static int s_managerUsage;
82
QWeakPointer<QWidget> m_notificationInterface;
83
QDateTime m_lastActivity;
85
JobTotalsWidget *m_jobSummaryWidget;
88
QWeakPointer<NotificationGroup> m_notificationGroup;
89
NotificationStack *m_notificationStack;
90
StackDialog *m_notificationStackDialog;
91
JobTotalsWidget *m_standaloneJobSummaryWidget;
92
Plasma::Dialog *m_standaloneJobSummaryDialog;
94
BusyWidget *m_busyWidget;
96
Ui::NotificationsConfig m_notificationUi;