Commit Graph

27 Commits

Author SHA1 Message Date
Moshe Kaplan 3953ddcf57 Add UI header files to Doxygen
Add @file markers for UI
header files so that Doxygen will
generate documentation for them.
2021-11-30 08:01:36 -05:00
Roland Knall 19f3a82ff8 Qt: ByteView make hover configurable
Allow the hover selection to be either configured via context menu
or by pressing the Ctrl key while moving the mouse. The configuration
is stored via profile
2021-09-13 15:33:46 +00:00
Gerald Combs d3f17ee08a Remove modelines in ui/qt.
Remove the editor modeline blocks from most of the source files in ui/qt
by running

    perl -i -p0e 's{ \n+ /[ *\n]+ editor \s+ modelines .* shiftwidth= .* \*/ \s+ } {\n}gsix' $( ag -g '\.(cpp|h)' )

then cleaning up the remaining files by hand.

This *shouldn't* affect anyone since

- All of the source files in ui/qt use 4 space indentation, which
  matches the default in our top-level .editorconfig

- The one notable editor that's likely to be used on these files and
  *doesn't* support EditorConfig (Qt Creator) defaults to 4 space
  indentation.
2021-03-08 18:11:32 +00:00
Stig Bjørlykke b8a330d2d5 Qt: Update ByteView recent settings on all tabs
The ByteView recent settings are common for all tabs. Ensure all
tabs are updated when display format or character encoding is changed.

This fixes an issue where the row_width is wrong and the menu action
checkmarks are out of sync after switching ByteView tab.

Change-Id: Ied25ac41467143f37327ccadcb821262eb86ef0a
Reviewed-on: https://code.wireshark.org/review/37655
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2020-07-03 06:11:56 +00:00
Roland Knall cfee0f8082 Qt: Remove frameSelect signal
As all frameSelect signals now transport a QList<int> of selected
frames, use this instead

Change-Id: I1888e45a4df997920aebde9706ca0ae803bdba03
Reviewed-on: https://code.wireshark.org/review/35176
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2019-11-21 10:59:05 +00:00
Stig Bjørlykke 14720ace06 Fix comment end after SPDX identifier
Move */ to a separate line below the SPDX identifier.

Change-Id: Id1032215449cfccae0933147b45e04b65e0b727f
Reviewed-on: https://code.wireshark.org/review/27211
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-05-01 06:56:37 +00:00
Peter Wu 9198448f9d Qt: fix crash in packet dialog on changing selection
"((capture_file_t *)cap_file_)->edt" is documented in cfile.h to cover
the currently selected packet (in the packet list). But in the packet
dialog, the packet selection is irrelevant and the data from a different
dissection tree must be used.

Change-Id: Ieaea3cf862d47540e7f6b6c84c1a2fa6945a877b
Fixes: v2.5.0rc0-1532-g56a130a152 ("ByteViewText: Remove epan dependancy")
Bug: 14246
Reviewed-on: https://code.wireshark.org/review/25437
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2018-02-14 08:03:10 +00:00
Dario Lombardo 8cd389e161 replace SPDX identifier GPL-2.0+ with GPL-2.0-or-later.
The first is deprecated, as per https://spdx.org/licenses/.

Change-Id: I8e21e1d32d09b8b94b93a2dc9fbdde5ffeba6bed
Reviewed-on: https://code.wireshark.org/review/25661
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-02-08 14:57:36 +00:00
Dario Lombardo e52172c775 Qt: use SPDX identifiers.
Change-Id: I111945c08f99818c249a868c12d9a7b3a3df64b3
Reviewed-on: https://code.wireshark.org/review/25563
Reviewed-by: Michael Mann <mmann78@netscape.net>
2018-02-02 13:39:36 +00:00
Gerald Combs d1254247b7 Qt: ByteViewText hover fixes & updates.
Add back field highlighting during hover.

Instead of marking hovered bytes using an underline+overline, draw a
border rect.

Change-Id: I574dd074cfa021ac0dec3cdea6c5f9b0b4da6d0e
Reviewed-on: https://code.wireshark.org/review/25348
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-01-17 11:37:49 +00:00
Roland Knall 18d49f467d Qt: Properly reset the byteview
Reset the byteview on every load of a capture file, and on every
start/reset of a capture

Change-Id: I0edd30ffddc64484bc6f009d99dfc6fc1a3ceb59
Reviewed-on: https://code.wireshark.org/review/24468
Reviewed-by: Roland Knall <rknall@gmail.com>
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-11-18 07:23:48 +00:00
Roland Knall e13e2df9a1 Qt: Rename packetSelection to frameSelected
In order to consolidate the interfaces between certain parts of the UI,
the signal emitted after a frame change has occured, has to include the
number of the frame. This led to two signals for frame change, and therefore
packetSelection is to be removed.

Change-Id: I24e0e0890291d2243935b0c48387beb66904bfa3
Reviewed-on: https://code.wireshark.org/review/24377
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2017-11-12 17:18:44 +00:00
Roland Knall 8a6ea0e454 Qt: Further cleanup ByteView
This further separates ByteView and the rest of the system.

Using FieldInformation and DataPrinter, this is the final cleanup
of the ByteViewTab

Change-Id: If41521167527cf5664c2564cdd0d45fea0f3f612
Reviewed-on: https://code.wireshark.org/review/22783
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2017-11-08 20:20:31 +00:00
Roland Knall 56a130a152 ByteViewText: Remove epan dependancy
Remove all dependancy for the byte_view_text from the epan system,
and therefore cleanly separate data and display for further separation
of dissection and view

Change-Id: Id1ee91b93da4511afa95f24da4cbbf39cbb89b1f
Reviewed-on: https://code.wireshark.org/review/24050
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2017-10-31 11:42:21 +00:00
Gilbert Ramirez e8e193694a Qt: Option to copy bytes to clipboard as Escaped String
Some users need to copy the bytes to a Python script for
sending out through a raw socket. While they can modify a
plain hex dump, having Wireshark copy directly as a Python
string makes their work easier. This format also works
with Bash, so it is called "Escaped String". E.g.:

	"\x55\xb5\xd4\x67\x03"

Change-Id: I0b6a5eb2e348f686397afda76095aaa2fb85c18d
Reviewed-on: https://code.wireshark.org/review/17696
Petri-Dish: Gilbert Ramirez <gram@alumni.rice.edu>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-09-15 04:13:59 +00:00
Gerald Combs 16b048d34b 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>
2015-07-30 19:13:38 +00:00
Gerald Combs 8664de017f Qt: Constify a bunch of strings.
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>
2015-03-05 20:17:29 +00:00
Gerald Combs c34ded4ae2 Qt/C++: Change a bunch of includes to forward declarations.
In theory this this should reduce compilation times. On my particular
system it makes no difference but hopefully it will elsewhere.

Change-Id: I570177d3ca4eec691c82d46b4dbbce74092aac1d
Reviewed-on: https://code.wireshark.org/review/7060
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-02-10 19:59:43 +00:00
Graham Bloice aad1a81b99 Fix out-of-tree build includes of config.h
If a file in the same directory as config.h, e.g. wireshark-qt.cpp
has a #include "config.h", or another header it includes also has
a #include "config.h", then an out-of-tree build, e.g. CMake will
pick up any in-tree config.h and odd things may happen.  The correct
form is #include <config.h> which will pick up the out-of-tree
version.

To find this, introduce a deliberate error and then make an out-of-tree
build, noting where it fails and fix that file.  If that file includes
other files that still cause the build to fail, set the compiler
to emit the pre-processed version so you can locate the include with
the next errant "config.h".  Repeat ad nauseum.

Possibly all includes of "config.h" should be changed to <config.h>

Revert "CMake: Clobber the top-level config.h before we build."

This reverts commit 1f3849ce61.

Ping-Bug: 10301
Change-Id: Ie567e7cc696fd48f3e730fc27032c5d2a7d8f341
Reviewed-on: https://code.wireshark.org/review/6285
Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
Petri-Dish: Graham Bloice <graham.bloice@trihedral.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-01-04 00:26:13 +00:00
Gerald Combs 1c159818fd Qt: ByteViewText hover information.
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-27 02:05:13 +00:00
Gerald Combs 31e86998fb Qt: Add zoom and column resize actions.
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-09-23 22:32:53 +00:00
Alexis La Goutte 296591399f Remove all $Id$ from top of file
(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>
2014-03-04 14:27:33 +00:00
Gerald Combs 32074376ac Show the byte view when we select a packet. Update some method and
variable names.

svn path=/trunk/; revision=45953
2012-11-06 21:49:16 +00:00
Gerald Combs 0a28fb8f6a Update the Qt byte view widget to reflect the recent changes in the GTK+
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-10-30 19:21:24 +00:00
Alexis La Goutte 42ace71553 Add modelines for Qtshark file
svn path=/trunk/; revision=44766
2012-09-04 08:18:31 +00:00
Jakub Zawadzki bf81b42e1e Update Free Software Foundation address.
(COPYING will be updated in next commit)

svn path=/trunk/; revision=43536
2012-06-28 22:56:06 +00:00
Gerald Combs 23a520237b Add initial support for Qt along with a "ui" subdirectory.
svn path=/trunk/; revision=40378
2012-01-04 22:13:01 +00:00