Allow searching in LogsPopup

This commit is contained in:
fourtf
2019-09-04 00:29:58 +02:00
parent 9ee286f60f
commit a268abfd4c
8 changed files with 93 additions and 80 deletions
+8 -11
View File
@@ -1,5 +1,6 @@
#pragma once
#include "ForwardDecl.hpp"
#include "messages/LimitedQueueSnapshot.hpp"
#include "widgets/BaseWindow.hpp"
@@ -9,30 +10,26 @@ class QLineEdit;
namespace chatterino {
class Channel;
class ChannelView;
struct Message;
using MessagePtr = std::shared_ptr<const Message>;
class SearchPopup : public BaseWindow
{
public:
SearchPopup();
void setChannel(std::shared_ptr<Channel> channel);
virtual void setChannel(const ChannelPtr &channel);
protected:
void keyPressEvent(QKeyEvent *e) override;
virtual void updateWindowTitle();
private:
void initLayout();
void performSearch();
void search();
LimitedQueueSnapshot<MessagePtr> snapshot_;
QLineEdit *searchInput_;
ChannelView *channelView_;
QString channelName_;
QLineEdit *searchInput_{};
ChannelView *channelView_{};
QString channelName_{};
};
} // namespace chatterino