mirror-chatterino2/src/singletons/Toasts.hpp
nerix 1043f9f803
Remove Unnecessary Includes in Headers (#4275)
* refactor: remove unnecessary includes in headers

* fix: formatting

* chore: changelog

* fix: scrollbar

* fix: suggestions and old appbase remains

* fix: suggestion

* fix: missing Qt forward declarations

* fix: another qt include

* fix: includes for precompiled-headers=off

* Add missing `<memory>` includes

* Add missing `#pragma once`

* Fix tests

Co-authored-by: Rasmus Karlsson <rasmus.karlsson@pajlada.com>
2022-12-31 14:41:01 +00:00

38 lines
932 B
C++

#pragma once
#include "common/Singleton.hpp"
#include <pajlada/settings/setting.hpp>
#include <QString>
namespace chatterino {
enum class Platform : uint8_t;
enum class ToastReaction {
OpenInBrowser = 0,
OpenInPlayer = 1,
OpenInStreamlink = 2,
DontOpen = 3
};
class Toasts final : public Singleton
{
public:
void sendChannelNotification(const QString &channelName,
const QString &channelTitle, Platform p);
static QString findStringFromReaction(const ToastReaction &reaction);
static QString findStringFromReaction(
const pajlada::Settings::Setting<int> &reaction);
static std::map<ToastReaction, QString> reactionToString;
static bool isEnabled();
private:
#ifdef Q_OS_WIN
void sendWindowsNotification(const QString &channelName,
const QString &channelTitle, Platform p);
#endif
};
} // namespace chatterino