mirror-chatterino2/src/widgets/helper/SearchPopup.hpp

39 lines
703 B
C++
Raw Normal View History

2018-01-05 13:42:23 +01:00
#pragma once
2018-06-26 14:09:39 +02:00
#include "messages/LimitedQueueSnapshot.hpp"
#include "widgets/BaseWindow.hpp"
2018-01-05 13:42:23 +01:00
#include <memory>
2018-01-05 13:42:23 +01:00
class QLineEdit;
2018-01-05 13:42:23 +01:00
namespace chatterino {
2018-01-05 13:42:23 +01:00
class Channel;
class ChannelView;
struct Message;
using MessagePtr = std::shared_ptr<const Message>;
class SearchPopup : public BaseWindow
2018-01-05 13:42:23 +01:00
{
public:
SearchPopup();
void setChannel(std::shared_ptr<Channel> channel);
protected:
void keyPressEvent(QKeyEvent *e) override;
2018-01-05 13:42:23 +01:00
private:
void initLayout();
void performSearch();
2018-07-06 19:23:47 +02:00
LimitedQueueSnapshot<MessagePtr> snapshot_;
QLineEdit *searchInput_;
ChannelView *channelView_;
QString channelName_;
2018-01-05 13:42:23 +01:00
};
} // namespace chatterino