mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-21 22:24:07 +01:00
18cb4bd6e5
* Add `<functional>` include to QStringHash.hpp This ensures the base `std::hash` template is declared before this specialization * Add missing includes to `src/providers/twitch/TwitchAccountManager.hpp` * Move explicit HelixChatters constructor to the source file * Remove unused includes & add used includes to NicknamesModel.hpp * NicknamesModel.hpp: Remove `virtual` when `override` is used * Add missing QStringHash include to TwitchEmotes.cpp * Add missing includes to various files * Print Qt version in cmake step Technically unrelated, but I'm sneaking it in * Add changelog entry
33 lines
759 B
C++
33 lines
759 B
C++
#pragma once
|
|
|
|
#include "widgets/listview/GenericListItem.hpp"
|
|
|
|
#include <functional>
|
|
#include <memory>
|
|
|
|
namespace chatterino {
|
|
|
|
struct Emote;
|
|
using EmotePtr = std::shared_ptr<const Emote>;
|
|
|
|
class InputCompletionItem : public GenericListItem
|
|
{
|
|
using ActionCallback = std::function<void(const QString &)>;
|
|
|
|
public:
|
|
InputCompletionItem(const EmotePtr &emote, const QString &text,
|
|
ActionCallback action);
|
|
|
|
// GenericListItem interface
|
|
public:
|
|
virtual void action() override;
|
|
virtual void paint(QPainter *painter, const QRect &rect) const override;
|
|
virtual QSize sizeHint(const QRect &rect) const override;
|
|
|
|
private:
|
|
EmotePtr emote_;
|
|
QString text_;
|
|
ActionCallback action_;
|
|
};
|
|
|
|
} // namespace chatterino
|