forked from cristianadam/llama.qtcreator
-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathllamasearchtoolbar.h
More file actions
38 lines (30 loc) · 829 Bytes
/
llamasearchtoolbar.h
File metadata and controls
38 lines (30 loc) · 829 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#pragma once
#include <QWidget>
class QLineEdit;
class QPushButton;
class QLabel;
class QCloseEvent;
class QEvent;
namespace LlamaCpp {
class SearchToolbar : public QWidget
{
Q_OBJECT
public:
explicit SearchToolbar(QWidget *parent = nullptr);
void setIndexLabel(const QString &label);
signals:
void onCloseEvent();
void onNextSearchClicked(bool checked = false);
void onPrevSearchClicked(bool checked = false);
void onSearchTextChanged(const QString &text);
protected:
void closeEvent(QCloseEvent *event) override;
bool eventFilter(QObject *obj, QEvent *event) override;
void applyStyleSheet();
private:
QLineEdit *m_searchEdit{nullptr};
QLabel *m_indexLabel;
QPushButton *m_prevSearchBtn{nullptr};
QPushButton *m_nextSearchBtn{nullptr};
};
} // namespace LlamaCpp