2019-08-17 20:07:11 +03:00
|
|
|
#include "notificationservice.h"
|
|
|
|
|
2019-08-17 20:33:18 +03:00
|
|
|
NotificationService::NotificationService(QObject * ptr): QObject (ptr) {
|
2019-08-17 20:07:11 +03:00
|
|
|
|
|
|
|
}
|
2019-08-17 20:33:18 +03:00
|
|
|
|
|
|
|
QString NotificationService::notify() const {
|
|
|
|
return _notify;
|
|
|
|
}
|
|
|
|
|
|
|
|
void NotificationService::setNotify(const QString& notify) {
|
|
|
|
if (_notify == notify)
|
|
|
|
return;
|
|
|
|
|
|
|
|
_notify = notify;
|
|
|
|
_history.push_back(_notify);
|
|
|
|
|
|
|
|
emit notifyChanged(_notify);
|
|
|
|
}
|
|
|
|
|
|
|
|
NotificationService *NotificationService::getService() {
|
|
|
|
static auto service = new NotificationService;
|
|
|
|
return service;
|
|
|
|
}
|
|
|
|
|
|
|
|
const QStringList &NotificationService::history() const {
|
|
|
|
return _history;
|
|
|
|
}
|