2018-01-05 13:42:23 +01:00
|
|
|
#pragma once
|
|
|
|
|
2019-09-04 00:29:58 +02:00
|
|
|
#include "ForwardDecl.hpp"
|
2018-06-26 14:09:39 +02:00
|
|
|
#include "messages/LimitedQueueSnapshot.hpp"
|
|
|
|
#include "widgets/BaseWindow.hpp"
|
2018-01-05 13:42:23 +01:00
|
|
|
|
2018-04-03 02:55:32 +02:00
|
|
|
#include <memory>
|
|
|
|
|
2018-01-05 13:42:23 +01:00
|
|
|
class QLineEdit;
|
2018-04-03 02:55:32 +02:00
|
|
|
|
2018-01-05 13:42:23 +01:00
|
|
|
namespace chatterino {
|
2018-04-03 02:55:32 +02:00
|
|
|
|
2018-01-14 21:55:36 +01:00
|
|
|
class SearchPopup : public BaseWindow
|
2018-01-05 13:42:23 +01:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
SearchPopup();
|
|
|
|
|
2019-09-04 00:29:58 +02:00
|
|
|
virtual void setChannel(const ChannelPtr &channel);
|
2018-01-05 13:42:23 +01:00
|
|
|
|
2019-05-05 19:19:47 +02:00
|
|
|
protected:
|
|
|
|
void keyPressEvent(QKeyEvent *e) override;
|
|
|
|
|
2019-09-04 00:29:58 +02:00
|
|
|
virtual void updateWindowTitle();
|
|
|
|
|
2018-01-05 13:42:23 +01:00
|
|
|
private:
|
|
|
|
void initLayout();
|
2019-09-04 00:29:58 +02:00
|
|
|
void search();
|
2018-07-06 19:23:47 +02:00
|
|
|
|
|
|
|
LimitedQueueSnapshot<MessagePtr> snapshot_;
|
2019-09-04 00:29:58 +02:00
|
|
|
QLineEdit *searchInput_{};
|
|
|
|
ChannelView *channelView_{};
|
|
|
|
QString channelName_{};
|
2018-01-05 13:42:23 +01:00
|
|
|
};
|
2018-04-03 02:55:32 +02:00
|
|
|
|
2018-01-14 21:55:36 +01:00
|
|
|
} // namespace chatterino
|