LogViewer
A modern log viewer with AI-assisted analysis (Qt 6)
Loading...
Searching...
No Matches
SearchBar.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <QWidget>
4
5class QLineEdit;
6class QLabel;
7class QPushButton;
8class QToolButton;
9
10namespace ui::qt {
11
19class SearchBar : public QWidget
20{
21 Q_OBJECT
22
23 public:
24 explicit SearchBar(QWidget* parent = nullptr);
25
27 void SetMatchInfo(int current, int total);
28
30 void FocusInput();
31
33 void CloseBar();
34
35 signals:
36 void SearchChanged(const QString& term, bool caseSensitive);
39 void Closed();
40
41 private slots:
42 void HandleTextChanged(const QString& text);
43 void HandleCaseToggled();
44
45 private:
46 QLineEdit* m_edit {nullptr};
47 QLabel* m_matchLabel {nullptr};
48 QPushButton* m_prevBtn {nullptr};
49 QPushButton* m_nextBtn {nullptr};
50 QToolButton* m_caseBtn {nullptr};
51 QPushButton* m_closeBtn {nullptr};
52};
53
54} // namespace ui::qt
Compact browser-style inline search bar for the events table.
Definition SearchBar.hpp:20
void SetMatchInfo(int current, int total)
Update the "current / total" match counter label.
Definition SearchBar.cpp:102
QLineEdit * m_edit
Definition SearchBar.hpp:46
void FocusInput()
Show the bar and focus the input field.
Definition SearchBar.cpp:124
QPushButton * m_prevBtn
Definition SearchBar.hpp:48
void HandleTextChanged(const QString &text)
Definition SearchBar.cpp:88
void HandleCaseToggled()
Definition SearchBar.cpp:97
QToolButton * m_caseBtn
Definition SearchBar.hpp:50
QPushButton * m_closeBtn
Definition SearchBar.hpp:51
void CloseBar()
Clear the text and hide the bar.
Definition SearchBar.cpp:131
QLabel * m_matchLabel
Definition SearchBar.hpp:47
QPushButton * m_nextBtn
Definition SearchBar.hpp:49
void SearchChanged(const QString &term, bool caseSensitive)
Definition ConfigEditorDialog.cpp:19