Wireshark 4.7.0
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
Signals | Public Member Functions | List of all members
ShowPacketBytesTextEdit Class Reference

QTextEdit subclass used inside ShowPacketBytesDialog that adds a context menu with "Show Selected Bytes" and "Show All Bytes" actions. More...

#include <show_packet_bytes_dialog.h>

Inheritance diagram for ShowPacketBytesTextEdit:

Signals

void showSelected (int start, int end)
 Emitted when the user chooses "Show Selected Bytes", carrying the character positions of the selection within the displayed text.
 

Public Member Functions

 ShowPacketBytesTextEdit (QWidget *parent=nullptr)
 Constructs a ShowPacketBytesTextEdit.
 
 ~ShowPacketBytesTextEdit ()
 Destroys the text edit widget.
 
void setShowSelectedEnabled (bool enabled)
 Enables or disables the "Show Selected Bytes" context menu action.
 
void setMenusEnabled (bool enabled)
 Enables or disables the entire context menu.
 

Detailed Description

QTextEdit subclass used inside ShowPacketBytesDialog that adds a context menu with "Show Selected Bytes" and "Show All Bytes" actions.

Constructor & Destructor Documentation

◆ ShowPacketBytesTextEdit()

ShowPacketBytesTextEdit::ShowPacketBytesTextEdit ( QWidget *  parent = nullptr)
explicit

Constructs a ShowPacketBytesTextEdit.

Parameters
parentOptional parent widget.

Member Function Documentation

◆ setMenusEnabled()

void ShowPacketBytesTextEdit::setMenusEnabled ( bool  enabled)
inline

Enables or disables the entire context menu.

Parameters
enabledtrue to show the context menu on right-click.

◆ setShowSelectedEnabled()

void ShowPacketBytesTextEdit::setShowSelectedEnabled ( bool  enabled)
inline

Enables or disables the "Show Selected Bytes" context menu action.

Parameters
enabledtrue to enable the action when text is selected.

◆ showSelected

void ShowPacketBytesTextEdit::showSelected ( int  start,
int  end 
)
signal

Emitted when the user chooses "Show Selected Bytes", carrying the character positions of the selection within the displayed text.

Parameters
startStart character position of the selection.
endEnd character position of the selection (exclusive).

The documentation for this class was generated from the following files: