Wireshark 4.5.0
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
follow_stream_text.h
Go to the documentation of this file.
1
10#ifndef FOLLOW_STREAM_TEXT_H
11#define FOLLOW_STREAM_TEXT_H
12
13#include <QPlainTextEdit>
14
15class FollowStreamText : public QPlainTextEdit
16{
17 Q_OBJECT
18public:
19 explicit FollowStreamText(QWidget *parent = 0);
20 bool isTruncated() const { return truncated_; }
21 void addText(QString text, bool is_from_server, uint32_t packet_num, bool colorize);
22 void addDeltaTime(double delta);
23 int currentPacket() const;
24
25protected:
26 void mouseMoveEvent(QMouseEvent *event);
27 void mousePressEvent(QMouseEvent *event);
28 void leaveEvent(QEvent *event);
29
30signals:
31 void mouseMovedToPacket(int);
32 void mouseClickedOnPacket(int);
33
34public slots:
35 void clear();
36
37private:
38 int textPosToPacket(int text_pos) const;
39 void addTruncated(int cur_pos);
40
41 static const int max_document_length_;
42 bool truncated_;
43 QMap<int, uint32_t> text_pos_to_packet_;
44 QColor metainfo_fg_;
45};
46
47#endif // FOLLOW_STREAM_TEXT_H
Definition follow_stream_text.h:16