10#ifndef IN_PACKET_FIND_BAR_H
11#define IN_PACKET_FIND_BAR_H
17#include <QPropertyAnimation>
30 Q_PROPERTY(
int barHeight READ barHeight WRITE
setBarHeight)
71 bool isMatch(
const QModelIndex &model_index)
const;
90 int barHeight()
const;
111 bool eventFilter(QObject *obj, QEvent *event)
override;
118 void onTextChanged(
const QString &text);
123 void performSearch();
143 void onToggleChanged();
149 void updateMatches();
154 void updateCounterLabel();
160 void navigateTo(qsizetype model_index);
166 void expandParents(
const QModelIndex &model_index);
173 void collectIndices(
const QModelIndex &parent, QList<QModelIndex> &out);
181 QToolButton *case_button_;
183 QToolButton *regex_button_;
185 QToolButton *word_button_;
187 QLabel *counter_label_;
189 QToolButton *prev_button_;
191 QToolButton *next_button_;
193 QToolButton *close_button_;
196 QTimer *debounce_timer_;
198 QPropertyAnimation *animation_;
204 static int open_instances_;
207 QList<QModelIndex> matches_;
209 qsizetype current_match_;
Find bar widget for searching within a specific packet's protocol tree.
Definition in_packet_find_bar.h:28
void matchesChanged()
Signal emitted when the search matches are updated.
void hideAnimated()
Hides the find bar with an animation.
Definition in_packet_find_bar.cpp:176
void showAnimated()
Shows the find bar with an animation.
Definition in_packet_find_bar.cpp:144
static int openInstances()
Returns the number of currently open instances of the find bar.
Definition in_packet_find_bar.h:49
bool isCurrentMatch(const QModelIndex &model_index) const
Checks if a specific model index is the currently active/selected match.
Definition in_packet_find_bar.cpp:215
void focusSearchField()
Sets focus to the search input field.
Definition in_packet_find_bar.cpp:202
bool eventFilter(QObject *obj, QEvent *event) override
Event filter for handling specific widget events.
Definition in_packet_find_bar.cpp:227
~InPacketFindBar()
Destroys the InPacketFindBar object.
Definition in_packet_find_bar.cpp:25
void setBarHeight(int h)
Sets the height of the animated bar.
Definition in_packet_find_bar.cpp:139
bool isMatch(const QModelIndex &model_index) const
Checks if a specific model index matches the current search criteria.
Definition in_packet_find_bar.cpp:210
bool isDarkMode() const
Checks whether the widget is currently operating in dark mode.
Definition in_packet_find_bar.cpp:222
A tree view for displaying protocol dissection details.
Definition proto_tree.h:30
QLineEdit subclass that adds syntax-state colouring, error messaging, and partial token-based autocom...
Definition syntax_line_edit.h:28