42 lines
940 B
C
Raw Normal View History

2019-08-19 18:02:40 +03:00
#ifndef NOTIFICATIONDATA_H
#define NOTIFICATIONDATA_H
#include <QObject>
class NotificationData
{
Q_GADGET
Q_PROPERTY(QString text READ text)
Q_PROPERTY(QString img READ img)
Q_PROPERTY(QString title READ title)
Q_PROPERTY(int type READ type)
2019-08-19 18:02:40 +03:00
QString _text;
QString _img;
QString _title;
int _type;
2019-08-19 18:02:40 +03:00
public:
enum Type {
Normal,
Warning = 1,
Error = 2,
};
explicit NotificationData(const QString& title = "",
const QString& text = "",
const QString& img = "",
Type type = Type::Normal);
2019-08-19 18:02:40 +03:00
Q_INVOKABLE QString text() const;
Q_INVOKABLE QString img() const;
Q_INVOKABLE QString title() const;
Q_INVOKABLE int type() const;
2019-08-19 18:02:40 +03:00
bool operator ==(const NotificationData &righ);
2019-08-22 09:53:48 +03:00
bool operator !=(const NotificationData &righ);
2019-08-19 18:02:40 +03:00
};
#endif // NOTIFICATIONDATA_H