10#ifndef SHOW_PACKET_BYTES_DIALOG_H
11#define SHOW_PACKET_BYTES_DIALOG_H
28class ShowPacketBytesDialog;
29class ShowPacketBytesTextEdit;
38 tvbuff_t *(*function)(tvbuff_t *, unsigned, unsigned);
68 void addCodecs(
const QMap<QString, const char *> &codecMap);
78 bool eventFilter(QObject *obj, QEvent *event)
override;
92 void on_sbStart_valueChanged(
int value);
98 void on_sbEnd_valueChanged(
int value);
105 void on_cbDecodeAs_currentIndexChanged(
int idx);
112 void on_cbShowAs_currentIndexChanged(
int idx);
117 void on_leFind_returnPressed();
123 void on_bFind_clicked();
128 void on_buttonBox_rejected();
136 void showSelected(
int start,
int end);
142 void useRegexFind(
bool use_regex);
149 void findText(
bool go_back =
true);
170 void setStartAndEnd(
int start,
int end);
177 bool enableShowSelected();
188 void updateHintLabel();
195 void sanitizeBuffer(QByteArray &ba,
bool handle_CR);
202 void symbolizeBuffer(QByteArray &ba);
210 QByteArray decodeQuotedPrintable(
const uint8_t *bytes,
int length);
216 void rot13(QByteArray &ba);
224 void updateFieldBytes(
bool initialization =
false);
230 void updatePacketBytes();
232 Ui::ShowPacketBytesDialog *ui;
235 QByteArray field_bytes_;
237 QString decode_as_name_;
238 QPushButton *print_button_;
239 QPushButton *copy_button_;
240 QPushButton *save_as_button_;
241 bool use_regex_find_;
295 void contextMenuEvent(QContextMenuEvent *event)
override;
309 bool show_selected_enabled_;
Manages a capture file and its associated state and operations.
Definition capture_file.h:27
void addCodecs(const QMap< QString, const char * > &codecMap)
Populates the character-encoding combo box with the supplied codecs.
Definition show_packet_bytes_dialog.cpp:128
ShowPacketBytesDialog(QWidget &parent, CaptureFile &cf)
Constructs a ShowPacketBytesDialog for the currently selected field.
Definition show_packet_bytes_dialog.cpp:42
bool eventFilter(QObject *obj, QEvent *event) override
Intercepts events on watched objects; used to detect text selection changes in the display widget.
Definition show_packet_bytes_dialog.cpp:450
void keyPressEvent(QKeyEvent *event) override
Handles key press events; maps Ctrl+F to the find field and Enter/Return to findText().
Definition show_packet_bytes_dialog.cpp:470
~ShowPacketBytesDialog()
Destroys the dialog and releases all associated resources.
Definition show_packet_bytes_dialog.cpp:122
void showSelected(int start, int end)
Emitted when the user chooses "Show Selected Bytes", carrying the character positions of the selectio...
ShowPacketBytesTextEdit(QWidget *parent=nullptr)
Constructs a ShowPacketBytesTextEdit.
Definition show_packet_bytes_dialog.cpp:932
void setShowSelectedEnabled(bool enabled)
Enables or disables the "Show Selected Bytes" context menu action.
Definition show_packet_bytes_dialog.h:272
~ShowPacketBytesTextEdit()
Destroys the text edit widget.
Definition show_packet_bytes_dialog.h:266
void setMenusEnabled(bool enabled)
Enables or disables the entire context menu.
Definition show_packet_bytes_dialog.h:278
virtual void updateWidgets()
Updates the state and contents of the dialog's widgets.
Definition wireshark_dialog.cpp:92
WiresharkDialog(QWidget &parent, CaptureFile &capture_file)
Constructs a new WiresharkDialog object.
Definition wireshark_dialog.cpp:30
Describes a single decompression algorithm available in the "Decode As" list of ShowPacketBytesDialog...
Definition show_packet_bytes_dialog.h:36
QString name
Definition show_packet_bytes_dialog.h:37