2019-08-17 20:33:18 +03:00

29 lines
589 B
C++

#include "notificationservice.h"
NotificationService::NotificationService(QObject * ptr): QObject (ptr) {
}
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;
}