9 #include <pajlada/serialize.hpp> 19 const QString &soundUrl, QColor color);
21 HighlightBadge(
const QString &badgeName,
const QString &displayName,
22 bool showInMentions,
bool hasAlert,
bool hasSound,
23 const QString &soundUrl, std::shared_ptr<QColor> color);
44 const std::shared_ptr<QColor>
getColor()
const;
53 bool compare(
const QString &
id,
const Badge &badge)
const;
61 std::shared_ptr<QColor> color_;
74 rapidjson::Document::AllocatorType &a)
76 rapidjson::Value ret(rapidjson::kObjectType);
85 value.getColor()->name(QColor::HexArgb), a);
96 if (!value.IsObject())
98 PAJLADA_REPORT_ERROR(error);
100 false,
false,
"", QColor());
104 QString _displayName;
105 bool _showInMentions =
false;
106 bool _hasAlert =
true;
107 bool _hasSound =
false;
109 QString encodedColor;
119 auto _color = QColor(encodedColor);
120 if (!_color.isValid())
124 _hasAlert, _hasSound, _soundUrl,
static QColor FALLBACK_HIGHLIGHT_COLOR
Definition: HighlightBadge.hpp:50
HighlightBadge(const QString &badgeName, const QString &displayName, bool showInMentions, bool hasAlert, bool hasSound, const QString &soundUrl, QColor color)
Definition: HighlightBadge.cpp:20
const QString & badgeName() const
Definition: HighlightBadge.cpp:51
Definition: HighlightBadge.hpp:12
bool showInMentions() const
Definition: HighlightBadge.cpp:61
Definition: Application.cpp:48
bool operator==(const HighlightBadge &other) const
Definition: HighlightBadge.cpp:10
const QString & displayName() const
Definition: HighlightBadge.cpp:56
void set(rapidjson::Value &obj, const char *key, const Type &value, rapidjson::Document::AllocatorType &a)
Definition: RapidjsonHelpers.hpp:22
Definition: Command.hpp:25
bool hasAlert() const
Definition: HighlightBadge.cpp:66
bool getSafe(const rapidjson::Value &obj, const char *key, Type &out)
Definition: RapidjsonHelpers.hpp:73
const std::shared_ptr< QColor > getColor() const
Definition: HighlightBadge.cpp:117
Definition: TwitchBadge.hpp:9
bool hasSound() const
Definition: HighlightBadge.cpp:71
bool hasCustomSound() const
Check if this highlight phrase has a custom sound set.
Definition: HighlightBadge.cpp:107
const QUrl & getSoundUrl() const
Definition: HighlightBadge.cpp:112
bool isMatch(const Badge &badge) const
Definition: HighlightBadge.cpp:76