mirror-chatterino2/src/util/Emotemap.hpp

30 lines
700 B
C++
Raw Normal View History

2017-12-31 22:58:35 +01:00
#pragma once
2018-06-26 14:09:39 +02:00
#include "messages/Image.hpp"
#include "util/ConcurrentMap.hpp"
2017-12-31 22:58:35 +01:00
namespace chatterino {
namespace util {
struct EmoteData {
EmoteData() = default;
2017-12-31 22:58:35 +01:00
EmoteData(messages::Image *_image);
2017-12-31 22:58:35 +01:00
// Emotes must have a 1x image to be valid
bool isValid() const;
messages::Image *getImage(float scale) const;
messages::Image *image1x = nullptr;
messages::Image *image2x = nullptr;
messages::Image *image3x = nullptr;
// Link to the emote page i.e. https://www.frankerfacez.com/emoticon/144722-pajaCringe
QString pageLink;
2017-12-31 22:58:35 +01:00
};
using EmoteMap = ConcurrentMap<QString, EmoteData>;
} // namespace util
} // namespace chatterino