mirror-chatterino2/emotes.h

48 lines
2.2 KiB
C
Raw Normal View History

2017-01-04 15:12:31 +01:00
#ifndef EMOTES_H
#define EMOTES_H
#include "twitchemotevalue.h"
#include "lazyloadedimage.h"
#include "QMutex"
#include "QMap"
#include "concurrentmap.h"
class Emotes
{
public:
static ConcurrentMap<QString, TwitchEmoteValue*>& twitchEmotes() { return *m_twitchEmotes ; }
static ConcurrentMap<QString, LazyLoadedImage* >& bttvEmotes() { return *m_bttvEmotes ; }
static ConcurrentMap<QString, LazyLoadedImage* >& ffzEmotes() { return *m_ffzEmotes ; }
static ConcurrentMap<QString, LazyLoadedImage* >& chatterinoEmotes() { return *m_chatterinoEmotes ; }
static ConcurrentMap<QString, LazyLoadedImage* >& bttvChannelEmoteFromCaches() { return *m_bttvChannelEmoteFromCaches; }
static ConcurrentMap<QString, LazyLoadedImage* >& fFzChannelEmoteFromCaches() { return *m_fFzChannelEmoteFromCaches ; }
static ConcurrentMap<int, LazyLoadedImage* >& twitchEmoteFromCache() { return *m_twitchEmoteFromCache ; }
static ConcurrentMap<int, LazyLoadedImage* >& miscImageFromCache() { return *m_miscImageFromCache ; }
2017-01-05 16:07:20 +01:00
static void loadGlobalEmotes();
static LazyLoadedImage* getCheerImage(long long int amount, bool animated);
2017-01-05 20:49:33 +01:00
static LazyLoadedImage* getCheerBadge(long long int amount);
2017-01-05 16:07:20 +01:00
2017-01-04 15:12:31 +01:00
private:
Emotes();
static ConcurrentMap<QString, TwitchEmoteValue*>* m_twitchEmotes;
static ConcurrentMap<QString, LazyLoadedImage* >* m_bttvEmotes;
static ConcurrentMap<QString, LazyLoadedImage* >* m_ffzEmotes;
static ConcurrentMap<QString, LazyLoadedImage* >* m_chatterinoEmotes;
static ConcurrentMap<QString, LazyLoadedImage* >* m_bttvChannelEmoteFromCaches;
static ConcurrentMap<QString, LazyLoadedImage* >* m_fFzChannelEmoteFromCaches;
static ConcurrentMap<int, LazyLoadedImage* >* m_twitchEmoteFromCache;
static ConcurrentMap<int, LazyLoadedImage* >* m_miscImageFromCache;
2017-01-05 20:49:33 +01:00
static LazyLoadedImage* m_cheerBadge100000;
static LazyLoadedImage* m_cheerBadge10000 ;
static LazyLoadedImage* m_cheerBadge5000 ;
static LazyLoadedImage* m_cheerBadge1000 ;
static LazyLoadedImage* m_cheerBadge100 ;
static LazyLoadedImage* m_cheerBadge1 ;
2017-01-04 15:12:31 +01:00
};
#endif // EMOTES_H