A view for displaying and interacting with JSON formatted data sources.
More...
#include <json_data_source_view.h>
|
| void | setMonospaceFont (const QFont &mono_font) |
| | Sets the monospace font used for rendering the JSON text.
|
| |
| void | markField (int start, int length, bool scroll_to=true, bool hover=false) |
| | Visually marks a field in the display.
|
| |
|
void | unmarkField () |
| | Clears the currently marked field.
|
| |
| void | markProtocol (int start, int length) |
| | Marks a protocol in the view (unused for JSON view).
|
| |
| void | markAppendix (int start, int length) |
| | 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 *) |
| | Handles paint events to draw the JSON text.
|
| |
|
virtual void | resizeEvent (QResizeEvent *) |
| | Handles resize events to adjust the text layout.
|
| |
|
virtual void | showEvent (QShowEvent *) |
| | Handles show events.
|
| |
|
virtual void | keyPressEvent (QKeyEvent *) |
| | Handles key press events for navigation.
|
| |
| virtual void | mousePressEvent (QMouseEvent *event) |
| | Handles mouse press events for selecting fields.
|
| |
| virtual void | mouseMoveEvent (QMouseEvent *event) |
| | Handles mouse move events for hovering over fields.
|
| |
| virtual void | leaveEvent (QEvent *event) |
| | 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 | ) |
|
|
protectedvirtual |
Handles leave events to clear hover states.
- Parameters
-
◆ markAppendix
| void JsonDataSourceView::markAppendix |
( |
int |
start, |
|
|
int |
length |
|
) |
| |
|
inlineslot |
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 |
|
) |
| |
|
slot |
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 |
|
) |
| |
|
inlineslot |
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 | ) |
|
|
protectedvirtual |
Handles mouse move events for hovering over fields.
- Parameters
-
◆ mousePressEvent()
| void JsonDataSourceView::mousePressEvent |
( |
QMouseEvent * |
event | ) |
|
|
protectedvirtual |
Handles mouse press events for selecting fields.
- Parameters
-
◆ setMonospaceFont
| void JsonDataSourceView::setMonospaceFont |
( |
const QFont & |
mono_font | ) |
|
|
slot |
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