extended notificationinstance interface for icon support

This commit is contained in:
Patrick von Reth 2010-09-24 18:23:40 +02:00
parent 74f64d9442
commit c06e3b9739
3 changed files with 9 additions and 9 deletions

View File

@ -22,9 +22,9 @@ SnoreNotificationInstance::SnoreNotificationInstance()
{
}
SnoreNotificationInstance::SnoreNotificationInstance ( const QString &appname, SnoreServer *parent ) :
SnoreNotificationInstance::SnoreNotificationInstance ( const QString &appname, SnoreServer *parent,const QString &icon ) :
_appName ( appname ),
_app ( new Application ( appname ) ),
_app ( new Application ( appname ,icon) ),
_snore ( parent )
{
setParent ( parent );
@ -36,9 +36,9 @@ SnoreNotificationInstance::~SnoreNotificationInstance()
}
void SnoreNotificationInstance::addAlert ( const QString &name, const QString &title )
void SnoreNotificationInstance::addAlert (const QString &name, const QString &title, const QString &icon)
{
_app->addAlert ( new Alert ( name,title.isNull() ?name:title ) );
_app->addAlert ( new Alert ( name,title.isNull() ?name:title,icon ) );
}

View File

@ -25,9 +25,9 @@ class SNORE_EXPORT SnoreNotificationInstance:public QObject
{
Q_OBJECT
public:
SnoreNotificationInstance ( const QString &appname,SnoreServer *parent );
SnoreNotificationInstance ( const QString &appname, SnoreServer *parent, const QString &icon="" );
~SnoreNotificationInstance();
void addAlert ( const QString &name,const QString &title = 0 );
void addAlert ( const QString &name,const QString &title = 0, const QString &icon="" );
void registerWithBackends();
void unregisterWithBackends();
int notify ( const QString &alert,const QString &title,const QString &text,const QString &icon = 0,int timeout = 10 );