mirror of
https://github.com/status-im/snorenotify.git
synced 2025-02-18 11:17:21 +00:00
extended notificationinstance interface for icon support
This commit is contained in:
parent
74f64d9442
commit
c06e3b9739
@ -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 ) );
|
||||
|
||||
}
|
||||
|
||||
|
@ -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 );
|
||||
|
Loading…
x
Reference in New Issue
Block a user