added missing file

This commit is contained in:
Patrick von Reth 2010-07-16 17:04:56 +02:00
parent bd80a4aea3
commit 97c405df58
2 changed files with 42 additions and 0 deletions

View File

@ -0,0 +1,19 @@
#include "trayiconnotifer.h"
#include <QSystemTrayIcon>
TrayIconNotifer::TrayIconNotifer(SnoreServer *snore, QSystemTrayIcon *icon):
Notification_Backend("TrayiconNotifer",snore),
_trayIcon(icon),
_id(0)
{}
int TrayIconNotifer::notify(QSharedPointer<Notification> notification){
_trayIcon->showMessage(notification->title(),notification->text(),QSystemTrayIcon::NoIcon,notification->timeout()*1000);
return _id++;
}
void TrayIconNotifer::closeNotification(int id){
}

View File

@ -0,0 +1,23 @@
#ifndef TRAYICONNOTIFER_H
#define TRAYICONNOTIFER_H
#include "interface.h"
#include "notification.h"
class TrayIconNotifer:public Notification_Backend
{
Q_OBJECT
public:
TrayIconNotifer(class SnoreServer *snore=0,class QSystemTrayIcon *icon=0);
bool isPrimaryNotificationBackend(){return true;}
public slots:
int notify(QSharedPointer<Notification> notification);
void closeNotification(int id);
private:
class QSystemTrayIcon *_trayIcon;
int _id;
};
#endif // TRAYICONNOTIFER_H