Abstract base class for widgets that display raw packet byte data.
More...
#include <base_data_source_view.h>
|
| 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.
|
| |
|
| void | byteHovered (int pos) |
| | Emitted when the cursor moves over a byte in the view.
|
| |
| void | byteSelected (int pos) |
| | Emitted when the user clicks a byte in the view.
|
| |
|
| | BaseDataSourceView (const QByteArray &data, QWidget *parent=nullptr) |
| | Construct a BaseDataSourceView.
|
| |
| virtual QSize | minimumSizeHint () const |
| | Return the minimum size hint for the view.
|
| |
| virtual bool | isEmpty () const |
| | Return whether the view contains no displayable data.
|
| |
| struct tvbuff * | tvb () const |
| | Return the tvbuff associated with this data source.
|
| |
| void | setTvb (struct tvbuff *tvb) |
| | Associate a Wireshark tvbuff with this data source.
|
| |
| int | tabIndex () const |
| | Return the tab index of this view within the byte-view panel.
|
| |
| void | setTabIndex (int tab_index) |
| | Set the tab index for this view.
|
| |
|
|
QByteArray | data_ |
| | The raw packet bytes displayed by this view.
|
| |
Abstract base class for widgets that display raw packet byte data.
◆ BaseDataSourceView()
| BaseDataSourceView::BaseDataSourceView |
( |
const QByteArray & |
data, |
|
|
QWidget * |
parent = nullptr |
|
) |
| |
|
inlineexplicit |
Construct a BaseDataSourceView.
- Parameters
-
| data | The raw packet bytes to display. The data is held by value; call detachData() before modifying the source array if copy-on-write sharing is undesirable. |
| parent | The parent widget; may be nullptr. |
◆ byteHovered
| void BaseDataSourceView::byteHovered |
( |
int |
pos | ) |
|
|
signal |
Emitted when the cursor moves over a byte in the view.
- Parameters
-
| pos | Zero-based byte offset within data_, or -1 when the cursor leaves the data area. |
◆ byteSelected
| void BaseDataSourceView::byteSelected |
( |
int |
pos | ) |
|
|
signal |
Emitted when the user clicks a byte in the view.
- Parameters
-
| pos | Zero-based byte offset within data_ of the selected byte. |
◆ isEmpty()
| virtual bool BaseDataSourceView::isEmpty |
( |
| ) |
const |
|
inlinevirtual |
Return whether the view contains no displayable data.
- Returns
- true if
data_ is empty; false if there are bytes to show.
◆ markAppendix
| virtual void BaseDataSourceView::markAppendix |
( |
int |
start, |
|
|
int |
length |
|
) |
| |
|
pure virtualslot |
Highlight the appendix byte range for the selected field.
- Parameters
-
| start | Zero-based byte offset of the first appendix byte. |
| length | Number of bytes in the appendix. |
◆ markField
| virtual void BaseDataSourceView::markField |
( |
int |
start, |
|
|
int |
length, |
|
|
bool |
scroll_to = true, |
|
|
bool |
hover = false |
|
) |
| |
|
pure virtualslot |
Highlight the byte range for a specific dissected field.
- Parameters
-
| start | Zero-based byte offset of the first byte in the field. |
| length | Number of bytes in the field. |
| scroll_to | true to scroll the field into view (default); false to update the highlight without scrolling. |
| hover | true to apply the hover colour; false (default) to apply the selection colour. |
◆ markProtocol
| virtual void BaseDataSourceView::markProtocol |
( |
int |
start, |
|
|
int |
length |
|
) |
| |
|
pure virtualslot |
Highlight the byte range belonging to the enclosing protocol layer.
- Parameters
-
| start | Zero-based byte offset of the first byte in the protocol span. |
| length | Number of bytes in the protocol span. |
◆ minimumSizeHint()
| virtual QSize BaseDataSourceView::minimumSizeHint |
( |
| ) |
const |
|
inlinevirtual |
Return the minimum size hint for the view.
- Returns
- An empty
QSize().
◆ setMonospaceFont
| virtual void BaseDataSourceView::setMonospaceFont |
( |
const QFont & |
mono_font | ) |
|
|
pure virtualslot |
Update the monospace font used to render byte values.
- Parameters
-
| mono_font | The new monospace QFont to apply. |
◆ setTabIndex()
| void BaseDataSourceView::setTabIndex |
( |
int |
tab_index | ) |
|
|
inline |
Set the tab index for this view.
- Parameters
-
| tab_index | The zero-based tab index assigned by the parent panel. |
◆ setTvb()
| void BaseDataSourceView::setTvb |
( |
struct tvbuff * |
tvb | ) |
|
|
inline |
Associate a Wireshark tvbuff with this data source.
- Parameters
-
| tvb | Pointer to the tvbuff for the current packet. |
◆ tabIndex()
| int BaseDataSourceView::tabIndex |
( |
| ) |
const |
|
inline |
Return the tab index of this view within the byte-view panel.
- Returns
- The zero-based tab index.
◆ tvb()
| struct tvbuff * BaseDataSourceView::tvb |
( |
| ) |
const |
|
inline |
Return the tvbuff associated with this data source.
- Returns
- A pointer to the associated
tvbuff, or nullptr if none has been set.
The documentation for this class was generated from the following file: