mirror of
https://github.com/QuasarApp/Snake.git
synced 2025-05-11 08:59:46 +00:00
35 lines
734 B
C++
35 lines
734 B
C++
#ifndef NOTIFICATIONSERVICE_H
|
|
#define NOTIFICATIONSERVICE_H
|
|
|
|
#include "notificationdata.h"
|
|
|
|
#include <QObject>
|
|
|
|
class NotificationService: public QObject
|
|
{
|
|
Q_OBJECT
|
|
|
|
Q_PROPERTY(NotificationData notify READ notify NOTIFY notifyChanged)
|
|
Q_PROPERTY(QList<NotificationData> history READ history NOTIFY notifyChanged)
|
|
|
|
private:
|
|
explicit NotificationService(QObject *ptr = nullptr);
|
|
|
|
NotificationData _notify;
|
|
QList<NotificationData> _history;
|
|
|
|
public:
|
|
NotificationData notify() const;
|
|
void setNotify(const NotificationData ¬ify);
|
|
static NotificationService* getService();
|
|
|
|
const QList<NotificationData> & history() const;
|
|
|
|
signals:
|
|
void notifyChanged();
|
|
};
|
|
|
|
|
|
|
|
#endif // NOTIFICATIONSERVICE_H
|