1 /***************************************************************************
4 * Copyright (C) 2008 Jason Stubbs <jasonbstubbs@gmail.com> *
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. *
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. *
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>
37 * @short Creator and amalgamator of the supported system tray specifications
39 class Manager
: public QObject
48 * @return a list of all known Task instances
50 QList
<Task
*> tasks() const;
53 * @return a list of all known Task instances
55 QList
<Notification
*> notifications() const;
58 * @return a list of all known Job instances
60 QList
<Job
*> jobs() const;
63 * Integrates the Job progress info into the applet's notification system
65 void registerJobProtocol();
68 * Iintegrates the notifications into the applet's notification system
70 void registerNotificationProtocol();
73 * Removes the Job progress info from the applet's notification system
75 void unregisterJobProtocol();
78 * Removes the notifications from the applet's notification system
80 void unregisterNotificationProtocol();
84 * Emitted when a new task has been added
86 void taskAdded(SystemTray::Task
*task
);
89 * Emitted when something about a task changes (such as it changing from
90 * non-embeddable to embeddable)
92 void taskChanged(SystemTray::Task
*task
);
95 * Emitted when a task has been removed
97 void taskRemoved(SystemTray::Task
*task
);
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
);
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
);