| Wireshark 4.7.0 The Wireshark network protocol analyzer

Loading...
Searching...
No Matches
lua_debugger_find_frame.h
1/* lua_debugger_find_frame.h
2 *
3 * Wireshark - Network traffic analyzer
4 * By Gerald Combs <gerald@wireshark.org>
5 * Copyright 1998 Gerald Combs
6 *
7 * SPDX-License-Identifier: GPL-2.0-or-later
8 */
9
10#ifndef LUA_DEBUGGER_FIND_FRAME_H
11#define LUA_DEBUGGER_FIND_FRAME_H
12
13#include "accordion_frame.h"
14
15#include <QPointer>
16
17 class QEvent;
18 class QKeyEvent;
19 class QPlainTextEdit;
20
21 namespace Ui {
22 class LuaDebuggerFindFrame;
23}
24
28 class LuaDebuggerFindFrame : public AccordionFrame
29{
30 Q_OBJECT
31
32 public:
33 explicit LuaDebuggerFindFrame(QWidget *parent = nullptr);
34 ~LuaDebuggerFindFrame() override;
35
36 void setTargetEditor(QPlainTextEdit *editor);
37
39 void scheduleFindFieldFocus();
40
41 protected:
42 bool eventFilter(QObject *watched, QEvent *event) override;
43 void keyPressEvent(QKeyEvent *event) override;
44
45 private:
46 Ui::LuaDebuggerFindFrame *ui_;
47 QPointer<QPlainTextEdit> editor_;
48
49 void focusFindField();
50
51 void findNext(bool backward);
52 bool selectionMatchesFind() const;
53 void replaceAll();
54
55 private slots:
56 void on_findNextButton_clicked();
57 void on_findPreviousButton_clicked();
58 void on_replaceButton_clicked();
59 void on_replaceAllButton_clicked();
60 void on_closeButton_clicked();
61};
62
63#endif // LUA_DEBUGGER_FIND_FRAME_H
accordion_frame.h
AccordionFrame
Definition accordion_frame.h:18
LuaDebuggerFindFrame
Inline find/replace bar for the Lua debugger code editor (AccordionFrame).
Definition lua_debugger_find_frame.h:29
LuaDebuggerFindFrame::scheduleFindFieldFocus
void scheduleFindFieldFocus()
After animatedShow(), move focus to the find field (call from dialog).
Definition lua_debugger_find_frame.cpp:90