summaryrefslogtreecommitdiff
path: root/ui/qt/byte_view_text.h
AgeCommit message (Collapse)AuthorFilesLines
2017-03-03Qt: allow Packet Bytes view to be shrinkedPeter Wu1-0/+1
Even if a packet has only one or two lines for the byte view, Qt autoresizing insists to require a minimum of 5.5 lines (or 7.5 lines for packets without multiple data sources). Remove this artificial requirement and allow the packet bytes view to be resized to show nothing (except for possible data sources tabs). This makes it easier to fit more packets and details for screenshots. Change-Id: I3ea997b9effa8292b396dc2ceb2ab1c35cead410 Reviewed-on: https://code.wireshark.org/review/20342 Reviewed-by: Gerald Combs <gerald@wireshark.org> Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-11-26Qt: Clean up the byte view hover highlight.Gerald Combs1-7/+9
Rename the text highlight enum "HighlightMode" to make its use and intent more clear. Add a mode for the offset highlight instead of using a separate variable. Use our palette to draw the hover highlight colors. Add a note about colors to the Developer's Guide. Change-Id: I488b2512a5058e17eb5b49c8ac55616100f32fbc Reviewed-on: https://code.wireshark.org/review/18953 Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Gerald Combs <gerald@wireshark.org>
2016-09-18Fix up coding style in ByteViewText.Gerald Combs1-2/+2
As WSDG 12.2.2.1 says, use trailing_underscore_ convention for member variables. Change-Id: I7d6dbcce3908aefc167cdc6ee1d054a2f5f5a072 Reviewed-on: https://code.wireshark.org/review/17756 Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Gerald Combs <gerald@wireshark.org>
2016-07-22Qt: Add hovered byte lock on left-clickJoão Valverde1-0/+1
Allows marking/unmarking a single byte in the bytes view pane. Ping-Bug: 11547 Change-Id: I574ad7c6218eb08018094ea92ba79b69dbe4b45d Reviewed-on: https://code.wireshark.org/review/16563 Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com> Tested-by: Michal Labedzki <michal.labedzki@tieto.com> Petri-Dish: João Valverde <j@v6e.pt> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: João Valverde <j@v6e.pt>
2016-07-01Qt: Add ASCII+EBCDIC actions to the byte view context menu.Gerald Combs1-2/+4
Add actions to switch between ASCII and EBCDIC, similar to the hex and bits items. Bug: 5298 Change-Id: Ib601ac6e89411e6482f3e4172726e16a08fdbd2b Reviewed-on: https://code.wireshark.org/review/16225 Reviewed-by: Gerald Combs <gerald@wireshark.org> Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2016-04-18Qt: highlight hovered bytePeter Wu1-1/+3
Make it easier to link the hex with ascii bytes. The background color will become yellow for bytes with the mouse focus. Bug: 11547 Change-Id: Iab87e598a302ecf7bb7b37cd6ad55ea291c02b82 Reviewed-on: https://code.wireshark.org/review/14716 Petri-Dish: Michal Labedzki <michal.labedzki@tieto.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
2015-12-22Qt: Plug memory leak in ByteViewText.Stig Bjørlykke1-0/+2
Each time we create a ByteViewText, which is twice when a packet is selected, the menu items leaks. Ensure we clear the items when done. Change-Id: Idf0c7b82bf241120dd4c42ba85c56c0a2bf8db46 Reviewed-on: https://code.wireshark.org/review/12826 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2015-12-18Qt: use recent.gui_bytes_view preference to remember bits / byte viewPascal Quantin1-7/+1
While we are at it, let's centralize bytes_view_type definition Bug: 11903 Change-Id: I606c779a8efaea668db1b440d3ae0336e6e3fc67 Reviewed-on: https://code.wireshark.org/review/12706 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com> Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2015-07-30Packet list and detail context menu updates.Gerald Combs1-0/+1
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>
2015-05-30Qt: Always draw a byte view.Gerald Combs1-0/+1
When we clear the ByteViewTab add an placeholder ByteViewText. Change-Id: I9fbcd7e609c084d5724a30f80aa141b59ab1c0a1 Reviewed-on: https://code.wireshark.org/review/8688 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-05-25Fix out of tree buildsGraham Bloice1-1/+1
Stop out of tree builds picking up the in-tree version and config.h Change-Id: Icadc46cab66db72af2d475eac31b28d0ca10df90 Reviewed-on: https://code.wireshark.org/review/8204 Petri-Dish: Anders Broman <a.broman58@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-03-05Qt: Constify a bunch of strings.Gerald Combs1-1/+1
Change-Id: I601e429408fc042fc5b18a4750d40e260da47f43 Reviewed-on: https://code.wireshark.org/review/7535 Petri-Dish: Gerald Combs <gerald@wireshark.org> Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-10-27Qt: Add bits display support to the byte view.Gerald Combs1-1/+8
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>
2014-10-27Qt: ByteViewText hover information.Gerald Combs1-7/+15
When the user hovers over a byte view field, highlight it and show a description in the status bar. Add a "byte" status bar context and fix a label stack pop bug. Keep proto_find_field_from_offset from matching generated items. Otherwise hovering and selecting finds things like GeoIP entries and checksum validation information. This affects the GTK+ UI as well. Change-Id: Ic81c0d8159510a72d30c41f961807d8a48d05e16 Reviewed-on: https://code.wireshark.org/review/4943 Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-10-26Use better theme-derived colors. Switch back to AlternateBase forGerald Combs1-1/+0
protocol-level highlighting. Change-Id: I3de3442885b93093c3a4f5341080713a2039cd4c Reviewed-on: https://code.wireshark.org/review/4933 Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-10-25Qt: ByteViewText fixups.Gerald Combs1-3/+9
Calculate our X coordinate using floating point arithmetic. This should hopefully fix the wierd subpixel text shifting for some font sizes. Add alpha blending convenience routines to ColorUtils. Use them to create the offset colors. The button color palette wasn't working very well under Ubuntu. Use QFontMetricsF::lineSpacing for our line height. Note that we don't support the BOLD gui.hex_dump_highlight_style preference. Leave a hint for anyone wishing to do so. Comment out related code for now. Change-Id: Ief77c9c8d00e05560cae6ecd781bd309027f6f5a Reviewed-on: https://code.wireshark.org/review/4927 Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-10-24Qt: Refactor ByteViewText.Gerald Combs1-23/+40
Instead of subclassing QTextEdit and filling it with the entire contents of our tvbuff, subclass QAbstractScrollArea and draw text by hand only when needed. The new code should be *much* faster. Some code based on QHexView by Even Teran (https://code.google.com/p/qhexview/). To do: - Finish the bit view implementation. Change-Id: Ie44de6870d80711cd44324521a17ab76bcefe5e5 Reviewed-on: https://code.wireshark.org/review/4922 Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-10-06Adjust some whitespace to match editor modelines.Bill Meier1-6/+6
Change-Id: I9fda7de49255857cc1cf270d6202c85573d91674 Reviewed-on: https://code.wireshark.org/review/4490 Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-09-23Qt: Add zoom and column resize actions.Gerald Combs1-0/+5
Plumb signals and slots for changing the text size in the main window. Remove the bold font code from WiresharkApplication. It was only used in ByteViewText. Adjust the icons a bit. Bug: When we change the font preferences the packet list stops drawing cached strings. I haven't been able to track down the cause. Change-Id: I609d740c9f26265628fa4b7de1b75b0e56651387 Reviewed-on: https://code.wireshark.org/review/4269 Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-03-04Remove all $Id$ from top of fileAlexis La Goutte1-2/+0
(Using sed : sed -i '/^ \* \$Id\$/,+1 d') Fix manually some typo (in export_object_dicom.c and crc16-plain.c) Change-Id: I4c1ae68d1c4afeace8cb195b53c715cf9e1227a8 Reviewed-on: https://code.wireshark.org/review/497 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2013-01-05Break out preference type names, type descriptions, stringGerald Combs1-0/+1
representations, and default status out of write_prefs and into their own routines. Split the corresponding custom preference write callbacks. Fix an apparent memory leak in the hidden column callback. Add an initial preferences dialog to the Qt port. Use the new preference routines to implement an "Adavanced" page similar to the "about:config" page available in many web browsers. Standard pages will hopefully follow soon. Remove some QDebug includes and make sure our QTreeWidgets have uniform row heights set. svn path=/trunk/; revision=46942
2012-11-06Show the byte view when we select a packet. Update some method andGerald Combs1-1/+1
variable names. svn path=/trunk/; revision=45953
2012-10-30Get rid of a couple of unused variables. Other minor cleanup.Gerald Combs1-3/+0
svn path=/trunk/; revision=45839
2012-10-30Update the Qt byte view widget to reflect the recent changes in the GTK+Gerald Combs1-11/+47
byte view. Move the packet_char_enc enum from packet.h to frame_data.h. Make the encoding flag a packet_char_enc and make it one bit. Get rid of the "cfile" global in a few places. C++-ize some of the font code. Clean up some variable names. svn path=/trunk/; revision=45838
2012-09-04Add modelines for Qtshark fileAlexis La Goutte1-0/+13
svn path=/trunk/; revision=44766
2012-06-28Update Free Software Foundation address.Jakub Zawadzki1-1/+1
(COPYING will be updated in next commit) svn path=/trunk/; revision=43536
2012-01-04Add initial support for Qt along with a "ui" subdirectory.Gerald Combs1-0/+62
svn path=/trunk/; revision=40378