mirror of
https://github.com/QuasarApp/Snake.git
synced 2025-04-27 18:24:41 +00:00
29 lines
589 B
C++
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;
|
|
}
|