Commit Graph

21 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
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
Martin Kaiser d5ec6882fe ColumnPreferencesFrame: fix memory leaks
Delete model and proxy model in the destructor.

QAbstractItemView::setItemDelegate() does not take ownership of the delegate
that is passed to it. We have to store it ourselves and free it.

Change-Id: I5d08d16e94a162d2a25450aec05ef672d4eaf528
Reviewed-on: https://code.wireshark.org/review/36878
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
Petri-Dish: Martin Kaiser <wireshark@kaiser.cx>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-04-19 14:43:57 +00:00
Roland Knall 3f105cae4d Qt: Move reset to contextmenu
Forego of the button and move the reset functionality to a
context menu

Change-Id: Ib23029586c69c8f3cd7c989c8b7c1f09be219bb1
Reviewed-on: https://code.wireshark.org/review/34827
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
Reviewed-by: Roland Knall <rknall@gmail.com>
2019-10-22 11:50:20 +00:00
Roland Knall f8ec872017 Qt: Reset all changes in the column preferences
Allow the user to reset the changes done. This can be done
at any time, as long as the dialog has not been closed

Change-Id: I0d72a7972b4ea94b53fbed4c84ea952fd6f71b01
Reviewed-on: https://code.wireshark.org/review/34825
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2019-10-21 21:40:57 +00:00
Roland Knall 366bd1947d Qt: ColumnPreferences hide hidden columns
Filter on columns being hidden or not

Change-Id: Ia41f556e00c7de471b1d4b7f9b5f6c099b7ddcf3
Reviewed-on: https://code.wireshark.org/review/34820
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2019-10-20 22:40:38 +00:00
Roland Knall 6820e3515a Qt: Fix Column Preferences
The current implementation has some serious bugs. e.g. if an added
column is moved, existing columns disappear. Also, if new columns
are being added, existing columns may disappear. This moves the column
preferences to a Movel/View concept and implements necessary checks
to ensure, that such an issue cannot occur

Change-Id: I73810812180e2fbed4d2fe67316f190aba82c719
Reviewed-on: https://code.wireshark.org/review/34819
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2019-10-20 22:20:38 +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
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
Michael Mann 0add74fcc9 Restore a preference column type if fields are empty.
The column type is automatically changed to Custom if user clicks
on the "Fields" or "Field Occurrences" column.  This can be
accidental and cause the user grief if he doesn't realize it.
If there is no text in the field, restore the type to its
original value.

Bug: 12465
Change-Id: I0453f43be13077aba58cca61011eeff9ca9b83b2
Reviewed-on: https://code.wireshark.org/review/15600
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-05-31 10:41:10 +00:00
Michal Labedzki 9bb3f6be4c Qt: Add missing multi-field column validation
GTK already has it, but Qt forgot about it, so multi-field custom column
works ok if previously saved in GTK-shark. Invalid validation prevent from
modifying and saving multi-field custom column in Qt version.

While at it, rename "custom field" to "custom fields" to ensure
we think about multi-field custom column.

Change-Id: I99588150ccb38be11b75f5dd5b0f6443e7055ebb
Reviewed-on: https://code.wireshark.org/review/12685
Petri-Dish: Michal Labedzki <michal.labedzki@tieto.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-12-20 08:21:02 +00:00
Gerald Combs c305f08921 PacketList column fixes.
Add a columnsChanged slot to PacketList and move the column update code
from redrawVisiblePackets there. Make sure we call
packet_list_model_->recreateVisibleRows, which should fix the behavior
described in bug 11324. Call columnsChanged when we, uh, change columns.

Add a sectionMoved slot to handle column reordering.

Don't rebuild the column list when we update the widgets in the column
preferences frame.  Do enable and disable the "remove" button as needed.

Try to keep the user from removing all of the columns in both the packet
list and column preferences.

Left as an exercise for the reader: The GTK+ UI also fails when you
remove all of the columns via the preferences:

  packet_list.c:377:packet_list_sort_column: assertion failed: (col)

Bug: 11324
Change-Id: Id58cf98e42cbda9aa2fc370ea06b8bcc6098c8ca
Reviewed-on: https://code.wireshark.org/review/9591
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-07-13 02:36:41 +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
Gerald Combs 5fb2f27428 Qt: Add a context menu to the packet list header.
Don't carry over the sort items from the GTK+ UI (for now, at least).
Update some names. Add a column editor frame similar to the "Go to
Packet" and "Search" frames.

Change-Id: I1bd3834a26994de96894d2b7512bce2c19915c77
Reviewed-on: https://code.wireshark.org/review/6277
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>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-01-06 15:22:04 +00:00
Gerald Combs a5cb72fe9e Add a Qt I/O Graph dialog.
For each graph you can set:
- Its visibility
- A name
- A display filter
- Color, from a fixed list
- Plot style: Line, Impulse, Bar, Stacked Bar, Dot, Square, Diamond
- Basic Y Axes (packets/s, bytes/s, bits/s)
- Computed Y Axes (SUM, MIN, AVG, MAX)
- Smoothing

You can pan and zoom using the mouse and keyboard. Clicking on a graph
selects the last packet for that interval. If all graphs have the same Y
axis a single label is shown, otherwise a legend is shown.

The time scale (X axis) can be toggled between relative seconds and the
time of day.

Graphs can be saved as PDF, PNG, BMP, and JPEG. Settings are "sticky"
via the io_graphs UAT.

To do:
- Minimize graph drawing delays.
- Figure out why smoothing differs from GTK+
- Everything else at the top of io_graph_dialog.cpp
- Fix empty resets.

A fair amount of code was copied from TCPStreamDialog. We might want to
subclass QCustomPlot and place the shared code there.

Move common syntax checking to SyntaxLineEdit.

Move some common code from ui/gtk/io_stat.c to ui/io_graph_item.[ch] and
use it in both GTK+ and Qt.

Make the io_graph_item_t array allocation in io_stat.c static. The
behavior should be identical and this gives us additional compile-time
checks.

Change-Id: I9a3d544469b7048f0761fdbf7bcf20f44ae76577
Reviewed-on: https://code.wireshark.org/review/435
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Tested-by: Gerald Combs <gerald@wireshark.org>
2014-04-07 20:56:42 +00:00
Alexis La Goutte 99505109bb Add missing modelines info
Change-Id: Ic0f83eb469442b386d6389c08860b0faaae2e324
Reviewed-on: https://code.wireshark.org/review/785
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-03-23 06:59:37 +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
Bill Meier 11b5c15fdb Remove trailing whitespace
Change-Id: I8116f63ff88687c8db3fd6e8e23b22ab2f759af0
Reviewed-on: https://code.wireshark.org/review/385
Reviewed-by: Bill Meier <wmeier@newsguy.com>
Tested-by: Bill Meier <wmeier@newsguy.com>
2014-02-25 20:46:49 +00:00
Gerald Combs 1c0deb0fc8 Add Filter Expressions^WButton^WShortcut^WBookmark preferences.
Add comments noting that

- We might want to do something different when the bookmark button is
  pressed.
- The display filters (dfilters file) and gui.filter_expressions
  preferences should be merged.
- Many buttons on Qt4 + OS X + unifiedTitleAndToolBarOnMac makes the
  main window really wide.

Add a qstring_strdup convenience routine. Add "disabled" display filter
edit icons. Fix up whitespace and descriptions in a couple of places.

svn path=/trunk/; revision=47522
2013-02-06 18:22:54 +00:00
Gerald Combs 21e66f0c6f Add column preferences.
svn path=/trunk/; revision=47231
2013-01-23 19:04:36 +00:00