mirror-chatterino2/src/widgets/dialogs/EmotePopup.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

52 lines
1.2 KiB
C++

#pragma once
#include "widgets/BasePopup.hpp"
#include <pajlada/signals/signal.hpp>
#include <QLineEdit>
namespace chatterino {
struct Link;
class ChannelView;
class Channel;
using ChannelPtr = std::shared_ptr<Channel>;
class Notebook;
class TwitchChannel;
class EmotePopup : public BasePopup
{
public:
EmotePopup(QWidget *parent = nullptr);
void loadChannel(ChannelPtr channel);
void closeEvent(QCloseEvent *event) override;
pajlada::Signals::Signal<Link> linkClicked;
private:
ChannelView *globalEmotesView_{};
ChannelView *channelEmotesView_{};
ChannelView *subEmotesView_{};
ChannelView *viewEmojis_{};
/**
* @brief Visible only when the user has specified a search query into the `search_` input.
* Otherwise the `notebook_` and all other views are visible.
*/
ChannelView *searchView_{};
ChannelPtr channel_;
TwitchChannel *twitchChannel_{};
QLineEdit *search_;
Notebook *notebook_;
void filterTwitchEmotes(std::shared_ptr<Channel> searchChannel,
const QString &searchText);
void filterEmotes(const QString &text);
void addShortcuts() override;
};
} // namespace chatterino