2017-01-04 15:12:31 +01:00
|
|
|
#include "emotes.h"
|
|
|
|
|
2017-01-11 18:52:09 +01:00
|
|
|
ConcurrentMap<QString, TwitchEmoteValue *> *Emotes::m_twitchEmotes =
|
|
|
|
new ConcurrentMap<QString, TwitchEmoteValue *>();
|
|
|
|
ConcurrentMap<QString, LazyLoadedImage *> *Emotes::m_bttvEmotes =
|
|
|
|
new ConcurrentMap<QString, LazyLoadedImage *>();
|
|
|
|
ConcurrentMap<QString, LazyLoadedImage *> *Emotes::m_ffzEmotes =
|
|
|
|
new ConcurrentMap<QString, LazyLoadedImage *>();
|
|
|
|
ConcurrentMap<QString, LazyLoadedImage *> *Emotes::m_chatterinoEmotes =
|
|
|
|
new ConcurrentMap<QString, LazyLoadedImage *>();
|
|
|
|
ConcurrentMap<QString, LazyLoadedImage *>
|
|
|
|
*Emotes::m_bttvChannelEmoteFromCaches =
|
|
|
|
new ConcurrentMap<QString, LazyLoadedImage *>();
|
|
|
|
ConcurrentMap<QString, LazyLoadedImage *> *Emotes::m_ffzChannelEmoteFromCaches =
|
|
|
|
new ConcurrentMap<QString, LazyLoadedImage *>();
|
|
|
|
ConcurrentMap<int, LazyLoadedImage *> *Emotes::m_twitchEmoteFromCache =
|
|
|
|
new ConcurrentMap<int, LazyLoadedImage *>();
|
|
|
|
ConcurrentMap<QString, LazyLoadedImage *> *Emotes::m_miscImageFromCache =
|
|
|
|
new ConcurrentMap<QString, LazyLoadedImage *>();
|
2017-01-04 15:12:31 +01:00
|
|
|
|
2017-01-11 18:52:09 +01:00
|
|
|
LazyLoadedImage *Emotes::m_cheerBadge100000 =
|
|
|
|
new LazyLoadedImage(new QImage(":/cheer100000"));
|
|
|
|
LazyLoadedImage *Emotes::m_cheerBadge10000 =
|
|
|
|
new LazyLoadedImage(new QImage(":/cheer10000"));
|
|
|
|
LazyLoadedImage *Emotes::m_cheerBadge5000 =
|
|
|
|
new LazyLoadedImage(new QImage(":/cheer5000"));
|
|
|
|
LazyLoadedImage *Emotes::m_cheerBadge1000 =
|
|
|
|
new LazyLoadedImage(new QImage(":/cheer1000"));
|
|
|
|
LazyLoadedImage *Emotes::m_cheerBadge100 =
|
|
|
|
new LazyLoadedImage(new QImage(":/cheer100"));
|
|
|
|
LazyLoadedImage *Emotes::m_cheerBadge1 =
|
|
|
|
new LazyLoadedImage(new QImage(":/cheer1"));
|
2017-01-05 20:49:33 +01:00
|
|
|
|
2017-01-05 16:07:20 +01:00
|
|
|
Emotes::Emotes()
|
|
|
|
{
|
|
|
|
}
|
2017-01-04 15:12:31 +01:00
|
|
|
|
2017-01-11 18:52:09 +01:00
|
|
|
LazyLoadedImage *
|
|
|
|
Emotes::getTwitchEmoteById(const QString &name, long id)
|
2017-01-06 23:28:48 +01:00
|
|
|
{
|
2017-01-11 01:08:20 +01:00
|
|
|
#pragma message WARN("xD")
|
2017-01-06 23:28:48 +01:00
|
|
|
return new LazyLoadedImage(NULL);
|
2017-01-11 18:52:09 +01:00
|
|
|
// return m_twitchEmoteFromCache->getOrAdd()
|
2017-01-06 23:28:48 +01:00
|
|
|
}
|
|
|
|
|
2017-01-11 18:52:09 +01:00
|
|
|
LazyLoadedImage *
|
|
|
|
Emotes::getCheerImage(long long amount, bool animated)
|
2017-01-05 16:07:20 +01:00
|
|
|
{
|
2017-01-11 01:08:20 +01:00
|
|
|
#pragma message WARN("xD")
|
2017-01-05 20:49:33 +01:00
|
|
|
return getCheerBadge(amount);
|
|
|
|
}
|
2017-01-04 15:12:31 +01:00
|
|
|
|
2017-01-11 18:52:09 +01:00
|
|
|
LazyLoadedImage *
|
|
|
|
Emotes::getCheerBadge(long long amount)
|
2017-01-05 20:49:33 +01:00
|
|
|
{
|
2017-01-11 18:52:09 +01:00
|
|
|
if (amount >= 100000) {
|
2017-01-05 20:49:33 +01:00
|
|
|
return m_cheerBadge100000;
|
2017-01-11 18:52:09 +01:00
|
|
|
} else if (amount >= 10000) {
|
2017-01-05 20:49:33 +01:00
|
|
|
return m_cheerBadge10000;
|
2017-01-11 18:52:09 +01:00
|
|
|
} else if (amount >= 5000) {
|
2017-01-05 20:49:33 +01:00
|
|
|
return m_cheerBadge5000;
|
2017-01-11 18:52:09 +01:00
|
|
|
} else if (amount >= 1000) {
|
2017-01-05 20:49:33 +01:00
|
|
|
return m_cheerBadge1000;
|
2017-01-11 18:52:09 +01:00
|
|
|
} else if (amount >= 100) {
|
2017-01-05 20:49:33 +01:00
|
|
|
return m_cheerBadge100;
|
2017-01-11 18:52:09 +01:00
|
|
|
} else {
|
2017-01-05 20:49:33 +01:00
|
|
|
return m_cheerBadge1;
|
|
|
|
}
|
2017-01-04 15:12:31 +01:00
|
|
|
}
|