add more spacing
[personal-kdebase.git] / workspace / plasma / applets / systemtray / core / manager.h
blob4f7ca74c634903d1dcdf5e230f736019144368d4
1 /***************************************************************************
2 * manager.h *
3 * *
4 * Copyright (C) 2008 Jason Stubbs <jasonbstubbs@gmail.com> *
5 * *
6 * This program is free software; you can redistribute it and/or modify *
7 * it under the terms of the GNU General Public License as published by *
8 * the Free Software Foundation; either version 2 of the License, or *
9 * (at your option) any later version. *
10 * *
11 * This program is distributed in the hope that it will be useful, *
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
14 * GNU General Public License for more details. *
15 * *
16 * You should have received a copy of the GNU General Public License *
17 * along with this program; if not, write to the *
18 * Free Software Foundation, Inc., *
19 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA . *
20 ***************************************************************************/
22 #ifndef SYSTEMTRAYMANAGER_H
23 #define SYSTEMTRAYMANAGER_H
25 #include <QtCore/QObject>
27 namespace SystemTray
30 class Applet;
31 class Notification;
32 class Task;
33 class Job;
35 /**
36 * w
37 * @short Creator and amalgamator of the supported system tray specifications
38 **/
39 class Manager : public QObject
41 Q_OBJECT
43 public:
44 Manager();
45 ~Manager();
47 /**
48 * @return a list of all known Task instances
49 **/
50 QList<Task*> tasks() const;
52 /**
53 * @return a list of all known Task instances
54 **/
55 QList<Notification*> notifications() const;
57 /**
58 * @return a list of all known Job instances
59 **/
60 QList<Job*> jobs() const;
62 /**
63 * Integrates the Job progress info into the applet's notification system
64 **/
65 void registerJobProtocol();
67 /**
68 * Iintegrates the notifications into the applet's notification system
69 **/
70 void registerNotificationProtocol();
72 /**
73 * Removes the Job progress info from the applet's notification system
74 **/
75 void unregisterJobProtocol();
77 /**
78 * Removes the notifications from the applet's notification system
79 **/
80 void unregisterNotificationProtocol();
82 signals:
83 /**
84 * Emitted when a new task has been added
85 **/
86 void taskAdded(SystemTray::Task *task);
88 /**
89 * Emitted when something about a task changes (such as it changing from
90 * non-embeddable to embeddable)
91 **/
92 void taskChanged(SystemTray::Task *task);
94 /**
95 * Emitted when a task has been removed
96 **/
97 void taskRemoved(SystemTray::Task *task);
99 /**
100 * Emitted when a new notification has been added
102 void notificationAdded(SystemTray::Notification *notification);
105 * Emitted when something about a notification changes
107 void notificationChanged(SystemTray::Notification *notification);
110 * Emitted when a notification has been removed
112 void notificationRemoved(SystemTray::Notification *notification);
115 * Emitted when a new job has been added
117 void jobAdded(SystemTray::Job *job);
120 * Emitted when something about a job changes
122 void jobChanged(SystemTray::Job *job);
125 * Emitted when a job has been removed
127 void jobRemoved(SystemTray::Job *job);
130 private slots:
131 void addTask(SystemTray::Task *task);
132 void removeTask(SystemTray::Task *task);
133 void addNotification(SystemTray::Notification *notification);
134 void removeNotification(SystemTray::Notification *notification);
135 void addJob(SystemTray::Job *job);
136 void removeJob(SystemTray::Job *job);
138 private:
139 class Private;
140 Private* const d;
142 friend class Applet;
148 #endif