summaryrefslogtreecommitdiff
path: root/ui/qt/byte_view_text.h
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2014-10-27 10:28:45 -0700
committerGerald Combs <gerald@wireshark.org>2014-10-27 17:33:05 +0000
commit84f0ce4e23e7a859d674d1f19fedada17a6e32be (patch)
treefa2dd2d94805c128241faf66ec589f9313348cc9 /ui/qt/byte_view_text.h
parentee7243239a56e27c75c896f727a27538112535e5 (diff)
downloadwireshark-84f0ce4e23e7a859d674d1f19fedada17a6e32be.tar.gz
Qt: Add bits display support to the byte view.
Add todo items for showing and hiding the offset, hex/bits, and ASCII/EBCDIC sections and adding UTF-8 support. Change-Id: Ia40faf3f939ef1a8fca6fac827057bd89045482a Reviewed-on: https://code.wireshark.org/review/4949 Reviewed-by: Gerald Combs <gerald@wireshark.org>
Diffstat (limited to 'ui/qt/byte_view_text.h')
-rw-r--r--ui/qt/byte_view_text.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/ui/qt/byte_view_text.h b/ui/qt/byte_view_text.h
index d1b03278ca..cbb7b0c372 100644
--- a/ui/qt/byte_view_text.h
+++ b/ui/qt/byte_view_text.h
@@ -31,6 +31,9 @@
#include "proto_tree.h"
#include <QAbstractScrollArea>
+#include <QMenu>
+
+class QActionGroup;
// XXX - Is there any reason we shouldn't add ByteViewImage, etc?
@@ -65,6 +68,7 @@ protected:
virtual void mousePressEvent (QMouseEvent * event);
virtual void mouseMoveEvent (QMouseEvent * event);
virtual void leaveEvent(QEvent *event);
+ virtual void contextMenuEvent(QContextMenuEvent *event);
private:
typedef enum {
@@ -102,6 +106,8 @@ private:
// Data
packet_char_enc encoding_; // ASCII or EBCDIC
bytes_view_type format_; // bytes in hex or bytes as bits
+ QActionGroup *format_actions_;
+ QMenu ctx_menu_;
// Data highlight
QPair<guint,guint> p_bound_;
@@ -122,8 +128,9 @@ private:
// Data selection
QMap<int,int> x_pos_to_column_;
-signals:
+private slots:
+ void setHexDisplayFormat(QAction *action);
};
#endif // BYTE_VIEW_TEXT_H