Utility class for formatting and exporting byte data in various text formats.
More...
#include <data_printer.h>
|
| static int | separatorInterval () |
| | Number of bytes after which to insert an extra separator space in a hex dump.
|
| |
| static int | hexChars () |
| | Calculates the total number of hexadecimal characters per line based on settings.
|
| |
| static QActionGroup * | copyActions (QObject *copyClass, QObject *data=Q_NULLPTR) |
| | Generates a QActionGroup containing copy actions for all supported formats.
|
| |
| static DataPrinter * | instance () |
| | Retrieves the singleton instance of DataPrinter.
|
| |
|
|
void | copyIDataBytes (bool) |
| | Slot triggered to copy bytes from a printable interface.
|
| |
Utility class for formatting and exporting byte data in various text formats.
◆ DumpType
Enumeration of supported data dump formats.
| Enumerator |
|---|
| DP_HexDump | Standard hex dump with ASCII representation.
|
| DP_HexOnly | Formatted hexadecimal characters only.
|
| DP_HexStream | Continuous stream of hexadecimal characters.
|
| DP_UTF8Text | UTF-8 encoded text.
|
| DP_ASCIIText | ASCII encoded text.
|
| DP_CString | C-style escaped string.
|
| DP_GoLiteral | Go language byte slice literal.
|
| DP_CArray | C-style byte array definition.
|
| DP_MimeData | Formatted MIME data.
|
| DP_Base64 | Base64 encoded string.
|
◆ DataPrinter()
| DataPrinter::DataPrinter |
( |
QObject * |
parent = 0 | ) |
|
|
explicit |
Constructs a new DataPrinter.
- Parameters
-
| parent | The parent QObject, defaults to 0. |
◆ byteLineLength()
| int DataPrinter::byteLineLength |
( |
| ) |
const |
Retrieves the current number of bytes displayed per line.
- Returns
- The byte line length.
◆ copyActions()
| QActionGroup * DataPrinter::copyActions |
( |
QObject * |
copyClass, |
|
|
QObject * |
data = Q_NULLPTR |
|
) |
| |
|
static |
Generates a QActionGroup containing copy actions for all supported formats.
- Parameters
-
| copyClass | The parent object to own the actions. |
| data | Optional context data to associate with the actions, defaults to Q_NULLPTR. |
- Returns
- A pointer to the created QActionGroup.
◆ hexChars()
| int DataPrinter::hexChars |
( |
| ) |
|
|
static |
Calculates the total number of hexadecimal characters per line based on settings.
- Returns
- The character count.
◆ instance()
◆ separatorInterval()
| static int DataPrinter::separatorInterval |
( |
| ) |
|
|
inlinestatic |
Number of bytes after which to insert an extra separator space in a hex dump.
- Returns
- The separator interval (defaults to 8).
◆ setByteLineLength()
| void DataPrinter::setByteLineLength |
( |
int |
bll | ) |
|
Sets the number of bytes displayed per line in formatted dumps.
- Parameters
-
| bll | The byte length per line. |
◆ toClipboard()
Formats the printable data and copies it to the system clipboard.
- Parameters
-
| type | The desired dump format. |
| printable | Pointer to the interface providing the data. |
The documentation for this class was generated from the following files:
- /builds/wireshark/wireshark/ui/qt/utils/data_printer.h
- /builds/wireshark/wireshark/ui/qt/utils/data_printer.cpp