~ubuntu-branches/ubuntu/utopic/kde-workspace/utopic-proposed

« back to all changes in this revision

Viewing changes to plasma/generic/applets/notifications/ui/notifications.h

  • Committer: Bazaar Package Importer
  • Author(s): Michał Zając
  • Date: 2011-07-09 08:31:15 UTC
  • Revision ID: james.westby@ubuntu.com-20110709083115-ohyxn6z93mily9fc
Tags: upstream-4.6.90
Import upstream version 4.6.90

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/***************************************************************************
 
2
 *   applet.h                                                              *
 
3
 *                                                                         *
 
4
 *   Copyright (C) 2008 Jason Stubbs <jasonbstubbs@gmail.com>              *
 
5
 *   Copyright (C) 2010 Marco Martin <notmart@gmail.com>                   *
 
6
 *                                                                         *
 
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.                                   *
 
11
 *                                                                         *
 
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.                          *
 
16
 *                                                                         *
 
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
 ***************************************************************************/
 
22
 
 
23
#ifndef NOTIFICATIONS_H
 
24
#define NOTIFICATIONS_H
 
25
 
 
26
#include <plasma/popupapplet.h>
 
27
 
 
28
#include "ui_notificationsconfig.h"
 
29
 
 
30
 
 
31
namespace Plasma
 
32
{
 
33
class ExtenderItem;
 
34
class TabBar;
 
35
class Dialog;
 
36
}
 
37
 
 
38
class NotificationWidget;
 
39
class StackDialog;
 
40
 
 
41
 
 
42
class Job;
 
43
class JobTotalsWidget;
 
44
class Manager;
 
45
class Notification;
 
46
class NotificationGroup;
 
47
class NotificationStack;
 
48
class BusyWidget;
 
49
 
 
50
class Notifications : public Plasma::PopupApplet
 
51
{
 
52
    Q_OBJECT
 
53
 
 
54
public:
 
55
    explicit Notifications(QObject *parent, const QVariantList &arguments = QVariantList());
 
56
    ~Notifications();
 
57
 
 
58
    void init();
 
59
    Manager *manager() const;
 
60
 
 
61
protected:
 
62
    void createConfigurationInterface(KConfigDialog *parent);
 
63
    void initExtenderItem(Plasma::ExtenderItem *extenderItem);
 
64
    void configChanged();
 
65
 
 
66
    void popupEvent(bool show);
 
67
 
 
68
private slots:
 
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();
 
75
 
 
76
private:
 
77
    void createJobGroups();
 
78
 
 
79
    Manager *m_manager;
 
80
    static int s_managerUsage;
 
81
 
 
82
    QWeakPointer<QWidget> m_notificationInterface;
 
83
    QDateTime m_lastActivity;
 
84
 
 
85
    JobTotalsWidget *m_jobSummaryWidget;
 
86
    bool m_autoHidePopup;
 
87
 
 
88
    QWeakPointer<NotificationGroup> m_notificationGroup;
 
89
    NotificationStack *m_notificationStack;
 
90
    StackDialog *m_notificationStackDialog;
 
91
    JobTotalsWidget *m_standaloneJobSummaryWidget;
 
92
    Plasma::Dialog *m_standaloneJobSummaryDialog;
 
93
 
 
94
    BusyWidget *m_busyWidget;
 
95
 
 
96
    Ui::NotificationsConfig m_notificationUi;
 
97
};
 
98
 
 
99
 
 
100
 
 
101
#endif