Commit Graph

16 Commits

Author SHA1 Message Date
John Thacker 7f2043c720 Qt: IO Graph human readable axis ticker with SI prefixes
Add a class for a QCustomPlot SI prefix axis ticker, using
format_units, and supporting both linear and log scales.
Use this for all the known IO Graph unit types (except don't
try to interpret BASE_UNIT_STRING yet.)

Use this to replace automatically scaling the data, avoiding
a lot of expensive floating point calculations for busy graphs.
This should make it easier to support smaller intervals
eventually (see #13682).

Fix #12827. Fix #14661.
2024-04-04 06:48:35 +00:00
John Thacker ecea70dbd3 Qt: Actually display the intended IO Graph Legend Title
The solution using a QCPTextElement doesn't seem to display the title.
It was adapted from https://www.qcustomplot.com/index.php/support/forum/443
Use the original solution from there with a class that inherits from
QCPAbstractLegendItem. As the author indicated that he would
"share in case any one else is needing the same functionality,"
mark it as public domain.
2024-03-27 08:19:00 +00:00
Gerald Combs eab4734a0d Logray: UI updates
Change some instances of "packet" to "event" in Logray's menu items.
Remove "Export Objects" and "Export PDUs" and associated code. Remove
the packet diagram menu items and associated code. Remove the "Decode
as" menu items and associated code.

Use "Selected" instead of the parenthetical plural "Packet(s)" for
marking and ignoring. Remove an attempt at plural translation which
apparently doesn't work if we don't have a "%n" in the translation
string.
2024-02-07 03:25:15 +00:00
Gerald Combs b5d010d44e CMake+Logray: Add the About → Authors CSV resource 2024-02-06 21:11:26 +00:00
Gerald Combs f01e345749 Logray: Add back the "Follow Stream" dialog
Manually revert cd9f7b64c7 and update it to match the changes in
537b49ee41.

Disable the packet list and detail follow menus if we don't have any
matching protocols.
2024-01-11 01:04:43 +00:00
John Thacker e66f010ca2 Qt: Add context menu to Resolved Addresses
Create a derived class for the TableViews to make it easier
to create the context menus.
Enable copying and saving only selected rows

Add release notes

Related to #16419
2023-12-04 11:19:41 +00:00
John Thacker 861a3eef63 Qt: Edit capture comments in separate dialog
The capture file properties dialog already lists the section
comments in the Details section, so it wastes some space to have
them a second time in the edit box.

Have an edit dialog for the capture comments. Have the edit dialog
use tabs so that we can edit multiple comments in a section, and
all sections. Allow adding new comments, removing comments, and
reordering comments.

Fix a few small leaks.

Related to #14599, #16133.
2023-10-18 05:53:31 +00:00
João Valverde 8ed0b47667 Qt: Add Lua console dialog
This adds a dialog in the Tools menu to open a console and evaluate
Lua code using the embedded Lua engine. It replaces the previous
console.lua implementation that was more limited to use, because
it relies on GUI bits exposed to Lua. It used two separate windows
for that reason.

The implementation uses the existing "funnel" API amd  relies heavily
on callbacks to maintain separation between GUI and epan code and
make it generic enough to possibly support more use cases than just
the Lua 5.2 console.

The open and close callbacks are used to install and remove a custom
print() lua function with dialog creation and destruction.

The eval callback is basically the same as luaL_dostring().
2023-08-16 15:19:00 +00:00
João Valverde f8f85cb9ad CMake: Modernize Qt6 configuration
Use the new COMPONENTS feature of find_papckage() to configure
Qt6. Leave Qt5 using the old method.

In the past using target_link_libraries() with an OBJECT library
wasn't fully supported but I think we are now requiring a modern
enough CMake version.

Besides being cleaner and more modern this also fixes some detection
problems I am experiencing[1].

[1]https://bugreports.qt.io/browse/QTBUG-95791
2023-06-09 13:57:33 +00:00
John Thacker 21a20185c1 UAT+Qt: Add dissector syntax line edit
Add a syntax line editor for dissector names, that validates and
provides completion. Use it in the UAT configuration.

It has been impossible to use the UAT to set a dissector with
capital letters; change things so that does work.

This doesn't display the description anywhere, but that would be
nice too.

A better fix for #18836.
2023-03-30 09:44:52 -04:00
John Thacker 537b49ee41 Qt: Create Follow Stream menu dynamically
Remove follow_type_t and use proto IDs in its place, since
follow streams are registered via proto ID. Add looking up
registered follow stream types by proto ID, and creating
FollowStreamDialog using proto ID.

Dynamically create the Follow actions based on the registered
follow streams.

Dissectors, including plugins, can now self-contain everything
necessary in order to add follow support (though shortcuts,
overriding the menu name, and special handling for "is the
protocol in the frame" still requires a few manual changes.)

The Conversation (and Endpoints) Dialog no longer need to know
anything special about whether UDP and TCP can be followed.
For example, this means that DCCP streams can automatically be
followed from the Conversation window.
2023-03-12 14:22:46 +00:00
Gerald Combs cd9f7b64c7 Logray: Remove the "Follow Stream" dialog
We don't reassemble log data into streams, so remove the "Follow" dialog
(for now, at least).
2023-01-22 23:36:23 +00:00
Gerald Combs ab4a4304ee Add Logray icons.
Add lricon.svg and lriconinst.svg, which provide the core graphic
element for the various Logray icons. Add lricon*.png, which were
created using the templates at
https://developer.apple.com/design/resources/. Add Logray.icns,
logray.ico, and lograyinst.ico, and use them in various packaging
resources.
2022-09-04 23:01:06 +00:00
João Valverde f2073b6d74 Qt: Fix build with Logray and Qt6
Copied from 349787051e.
2022-08-25 21:55:46 +01:00
Tomasz Moń 18e08d04d1
Qt: Setup GLib mainloop when needed
GLib watches and timeouts require GLib mainloop iterations. If the GLib
mainloop is not running, then GLib watches and timeouts won't trigger.
Back in the GTK+ days, then GLib mainloop was running on all systems.
Since the Qt transition, GLib mainloop only runs on Linux when Qt does
support it and environment variable QT_NO_GLIB=1 is not set.

Start polling GLib mainloop in separate thread if Qt is not running GLib
mainloop. Note that only the polling is handled in separate thread, the
dispatch and thus all user callbacks execute in the main thread.

Running GLib mainloop when needed enables full GLib functionality on all
platforms and thus allows us to simplify our code by using GLib platform
specific code.
2022-07-24 20:57:18 +02:00
Gerald Combs 75efbb1ac4 Rename Logwolf to Logray
Switch to the name "Logray" for the log analyzer. Rays are biological
cousins of sharks and more people like the name "Logray" in a completely
unscientific survey here. Apologies for any inconvenience this might
cause.
2022-07-06 15:04:25 +00:00