2020-05-23 02:30:51 +03:00
|
|
|
/*
|
2021-01-31 19:57:49 +03:00
|
|
|
* Copyright (C) 2018-2021 QuasarApp.
|
2020-05-23 02:30:51 +03:00
|
|
|
* Distributed under the lgplv3 software license, see the accompanying
|
|
|
|
* Everyone is permitted to copy and distribute verbatim copies
|
|
|
|
* of this license document, but changing it is not allowed.
|
|
|
|
*/
|
|
|
|
|
2019-11-19 15:20:38 +03:00
|
|
|
#include "notificationdata.h"
|
|
|
|
namespace QmlNotificationService {
|
|
|
|
|
|
|
|
NotificationData::NotificationData(const QString &title,
|
|
|
|
const QString &text,
|
2021-01-18 23:20:03 +03:00
|
|
|
const QString &img, int type) {
|
2019-11-19 15:20:38 +03:00
|
|
|
|
|
|
|
_text = text;
|
|
|
|
_title = title;
|
|
|
|
_img = img;
|
|
|
|
_type = type;
|
|
|
|
}
|
|
|
|
|
|
|
|
QString NotificationData::text() const {
|
|
|
|
return _text;
|
|
|
|
}
|
|
|
|
|
|
|
|
QString NotificationData::img() const {
|
|
|
|
return _img;
|
|
|
|
}
|
|
|
|
|
|
|
|
QString NotificationData::title() const {
|
|
|
|
return _title;
|
|
|
|
}
|
|
|
|
|
|
|
|
bool NotificationData::operator ==(const NotificationData &righ) {
|
|
|
|
return _title == righ._title &&
|
|
|
|
_text == righ._text &&
|
|
|
|
_img == righ._img &&
|
|
|
|
_type == righ._type;
|
|
|
|
}
|
|
|
|
|
|
|
|
bool NotificationData::operator !=(const NotificationData &righ) {
|
|
|
|
return !operator==(righ);
|
|
|
|
}
|
|
|
|
|
|
|
|
int NotificationData::type() const {
|
|
|
|
return _type;
|
|
|
|
}
|
2019-11-20 17:54:52 +03:00
|
|
|
|
|
|
|
bool NotificationData::isValid() const {
|
|
|
|
return _text.size() || _title.size() || _img.size();
|
|
|
|
}
|
2019-11-19 15:20:38 +03:00
|
|
|
}
|