10#ifndef FOLLOW_STREAM_TEXT_H
11#define FOLLOW_STREAM_TEXT_H
13#include <QPlainTextEdit>
42 void addText(QString text,
bool is_from_server, uint32_t packet_num,
bool colorize,
bool marked);
106 int textPosToPacket(
int text_pos)
const;
112 void addTruncated(
int cur_pos);
115 static const int max_document_length_;
121 QMap<int, uint32_t> text_pos_to_packet_;
void mouseMoveEvent(QMouseEvent *event) override
Handles mouse move events to track packet selection.
Definition follow_stream_text.cpp:137
bool isTruncated() const
Checks if the displayed text was truncated due to length limits.
Definition follow_stream_text.h:32
void addDeltaTime(double delta)
Adds a delta time metadata string to the display.
Definition follow_stream_text.cpp:111
void mouseClickedOnPacket(int packet_num)
Signal emitted when text belonging to a specific packet is clicked.
void clear()
Clears the text display and internal mapping.
Definition follow_stream_text.cpp:160
void mouseMovedToPacket(int packet_num)
Signal emitted when the mouse hovers over text belonging to a specific packet.
int currentPacket() const
Retrieves the packet number corresponding to the current cursor position.
Definition follow_stream_text.cpp:167
void leaveEvent(QEvent *event) override
Handles events when the mouse leaves the widget.
Definition follow_stream_text.cpp:154
void addText(QString text, bool is_from_server, uint32_t packet_num, bool colorize, bool marked)
Adds a segment of text to the display.
Definition follow_stream_text.cpp:67
void setMonospaceFont(const QFont &mono_font)
Applies a monospace font to the document and the widget.
Definition follow_stream_text.cpp:43
FollowStreamText(QWidget *parent=0)
Constructs a new FollowStreamText widget.
Definition follow_stream_text.cpp:28
void mousePressEvent(QMouseEvent *event) override
Handles mouse press events to select specific packets.
Definition follow_stream_text.cpp:148