aboutsummaryrefslogtreecommitdiffstats
path: root/ui/qt/byte_view_tab.h
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2015-07-29 16:24:39 -0700
committerGerald Combs <gerald@wireshark.org>2015-07-30 19:13:38 +0000
commit16b048d34b51af0ddcfe6dd47865628bcd07223c (patch)
tree356e85b15a51a3418401efe9c90a2b447df4457d /ui/qt/byte_view_tab.h
parente482786ae8278377edeb1ac40cb68accdb71451f (diff)
Packet list and detail context menu updates.
Add some missing items to the packet list and detail "Copy" context menus. Don't nest the "Copy" items so deeply. Add YAML to the supported summary formats. Note that "Copy as Binary" copies to the clipboard as application/octet-stream, which is a) arguably correct, and b) not very useful. Fixes welcome. Enable and disable packet detail context menu items from a set of booleans similar to the packet list. Change-Id: Iaa931c766aa476c33f27de089e5c4dbaf9ce74d6 Ping-Bug: 9320 Bug: 10831 Reviewed-on: https://code.wireshark.org/review/9825 Reviewed-by: Gerald Combs <gerald@wireshark.org>
Diffstat (limited to 'ui/qt/byte_view_tab.h')
-rw-r--r--ui/qt/byte_view_tab.h16
1 files changed, 15 insertions, 1 deletions
diff --git a/ui/qt/byte_view_tab.h b/ui/qt/byte_view_tab.h
index 47151c7c11..31860fb935 100644
--- a/ui/qt/byte_view_tab.h
+++ b/ui/qt/byte_view_tab.h
@@ -39,15 +39,29 @@ class ByteViewTab : public QTabWidget
{
Q_OBJECT
public:
+ enum copyDataType {
+ copyDataHexTextDump,
+ copyDataHexDump,
+ copyDataPrintableText,
+ copyDataHexStream,
+ copyDataBinary
+ };
+
explicit ByteViewTab(QWidget *parent = 0);
void addTab(const char *name = "", tvbuff_t *tvb = NULL, proto_tree *tree = NULL, QTreeWidget *protoTree = NULL, packet_char_enc encoding = PACKET_CHAR_ENC_CHAR_ASCII);
void clear();
+ void copyData(copyDataType copy_type, field_info *fi = NULL);
private:
- void setTabsVisible();
capture_file *cap_file_;
QFont mono_font_;
+ void setTabsVisible();
+ void copyHexTextDump(const guint8 *data_p, int data_len, bool append_text);
+ void copyPrintableText(const guint8 *data_p, int data_len);
+ void copyHexStream(const guint8 *data_p, int data_len);
+ void copyBinary(const guint8 *data_p, int data_len);
+
protected:
void tabInserted(int index);
void tabRemoved(int index);