A view for displaying and interacting with JSON formatted data sources.
More...
#include <json_data_source_view.h>
|
| void | setMonospaceFont (const QFont &mono_font) override |
| | Sets the monospace font used for rendering the JSON text.
|
| void | markField (int start, int length, bool scroll_to=true, bool hover=false) override |
| | Visually marks a field in the display.
|
|
void | unmarkField () override |
| | Clears the currently marked field.
|
| void | markProtocol (int start, int length) override |
| | Marks a protocol in the view (unused for JSON view).
|
| void | markAppendix (int start, int length) override |
| | Marks the appendix in the view (unused for JSON view).
|
| virtual void | setMonospaceFont (const QFont &mono_font)=0 |
| | Update the monospace font used to render byte values.
|
|
virtual void | detachData () |
| | Detach the internal QByteArray from any shared copy.
|
| virtual void | markProtocol (int start, int length)=0 |
| | Highlight the byte range belonging to the enclosing protocol layer.
|
| virtual void | markField (int start, int length, bool scroll_to=true, bool hover=false)=0 |
| | Highlight the byte range for a specific dissected field.
|
| virtual void | markAppendix (int start, int length)=0 |
| | Highlight the appendix byte range for the selected field.
|
|
virtual void | unmarkField ()=0 |
| | Clear all field and appendix highlights.
|
|
|
virtual void | paintEvent (QPaintEvent *) override |
| | Handles paint events to draw the JSON text.
|
|
virtual void | resizeEvent (QResizeEvent *) override |
| | Handles resize events to adjust the text layout.
|
|
virtual void | showEvent (QShowEvent *) override |
| | Handles show events.
|
|
virtual void | keyPressEvent (QKeyEvent *) override |
| | Handles key press events for navigation.
|
| virtual void | mousePressEvent (QMouseEvent *event) override |
| | Handles mouse press events for selecting fields.
|
| virtual void | mouseMoveEvent (QMouseEvent *event) override |
| | Handles mouse move events for hovering over fields.
|
| virtual void | leaveEvent (QEvent *event) override |
| | Handles leave events to clear hover states.
|
|
|
QByteArray | data_ |
| | The raw packet bytes displayed by this view.
|
A view for displaying and interacting with JSON formatted data sources.
◆ JsonDataSourceView()
| JsonDataSourceView::JsonDataSourceView |
( |
const QByteArray & | data, |
|
|
proto_node * | root_node, |
|
|
QWidget * | parent = nullptr ) |
|
explicit |
Constructs a new JsonDataSourceView.
- Parameters
-
| data | The raw JSON byte data. |
| root_node | The root protocol node of the JSON tree. |
| parent | The parent widget, defaults to nullptr. |
◆ fieldHighlight
Signal emitted when a JSON field is hovered or highlighted.
- Parameters
-
| finfo | Pointer to the highlighted field information. |
◆ fieldSelected
Signal emitted when a JSON field is selected.
- Parameters
-
| finfo | Pointer to the selected field information. |
◆ leaveEvent()
| void JsonDataSourceView::leaveEvent |
( |
QEvent * | event | ) |
|
|
overrideprotectedvirtual |
Handles leave events to clear hover states.
- Parameters
-
◆ markAppendix
| void JsonDataSourceView::markAppendix |
( |
int | start, |
|
|
int | length ) |
|
inlineoverrideslot |
Marks the appendix in the view (unused for JSON view).
- Parameters
-
| start | The starting byte offset. |
| length | The length in bytes. |
◆ markField
| void JsonDataSourceView::markField |
( |
int | start, |
|
|
int | length, |
|
|
bool | scroll_to = true, |
|
|
bool | hover = false ) |
|
overrideslot |
Visually marks a field in the display.
- Parameters
-
| start | The starting byte offset. |
| length | The length of the field in bytes. |
| scroll_to | True to automatically scroll the view to the marked field. |
| hover | True if the field is being marked due to a hover action. |
◆ markProtocol
| void JsonDataSourceView::markProtocol |
( |
int | start, |
|
|
int | length ) |
|
inlineoverrideslot |
Marks a protocol in the view (unused for JSON view).
- Parameters
-
| start | The starting byte offset. |
| length | The length in bytes. |
◆ mouseMoveEvent()
| void JsonDataSourceView::mouseMoveEvent |
( |
QMouseEvent * | event | ) |
|
|
overrideprotectedvirtual |
Handles mouse move events for hovering over fields.
- Parameters
-
◆ mousePressEvent()
| void JsonDataSourceView::mousePressEvent |
( |
QMouseEvent * | event | ) |
|
|
overrideprotectedvirtual |
Handles mouse press events for selecting fields.
- Parameters
-
◆ setMonospaceFont
| void JsonDataSourceView::setMonospaceFont |
( |
const QFont & | mono_font | ) |
|
|
overrideslot |
Sets the monospace font used for rendering the JSON text.
- Parameters
-
| mono_font | The monospace font to apply. |
The documentation for this class was generated from the following files:
- /builds/wireshark/wireshark/ui/qt/widgets/json_data_source_view.h
- /builds/wireshark/wireshark/ui/qt/widgets/json_data_source_view.cpp