Commit Graph

5 Commits

Author SHA1 Message Date
Roland Knall d58da8ec90 Interface View/Model: Correct column ordering
This orders the columns correctly in the sequence the developer
has intended when adding them with setColumns. Also it allows for
disabling and inverting the filtering by type, as well as query
additional roles instead of only Qt::DisplayRole from the tree model.

Change-Id: I90469e8e3f3caa50debb3c839590d42719a6fb10
Reviewed-on: https://code.wireshark.org/review/18096
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Roland Knall <rknall@gmail.com>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2016-10-07 14:31:30 +00:00
Roland Knall a50bed094b Interface List: Allow column filtering in model
This change allows for the definition of columns to be shown
to the enduser if instanting the proxy model. The tree model
will allways transport ALL data, and it is the job of the proxy
model to determine which data is actually shown.

Additionally, this removes the final definitions of the global
interface array from interface_frame as well as sort_filter, so
that knowledge about the inner workings of the interface list
is contained to interface_tree_model

Change-Id: Ib34b150066ee344ad0d18bec1d90826eb0fa28b2
Reviewed-on: https://code.wireshark.org/review/18039
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Roland Knall <rknall@gmail.com>
2016-10-03 17:06:03 +00:00
Roland Knall 53523a739c Interface List: Fix build for no PCAP builds
This is a fix for building without libpcap. Also, changing _U_
to Q_UNUSED for the tree_model

Change-Id: I38a992731a3d3c4062ffab3cca0049cf08050794
Reviewed-on: https://code.wireshark.org/review/18019
Petri-Dish: Roland Knall <rknall@gmail.com>
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-10-02 18:18:34 +00:00
Roland Knall fea4d585ed Interface List: Hide button for only one interface
If only one interface type exists, the button row is being hidden.

Change-Id: Ieed9c363ab1ebc4bc15d0e09bceeb79a04d6e76e
Reviewed-on: https://code.wireshark.org/review/18017
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Roland Knall <rknall@gmail.com>
2016-10-02 17:56:54 +00:00
Roland Knall 99097dd3c6 Interface List: Change display to view/model
This changes the underlying model of the main interface tree.
Because of that, we can resort to a view/model approach, enlisting
the global interfaces list as only data source.

The interface list works identical to the old list, but allows
for filtering of the displayed interfaces by type. Only types, which
are present and whose interfaces are not hidden, are being displayed
for selection.

Change-Id: If8475b227daa026dc0ad3d25bc7fe050d5bf2ac3
Reviewed-on: https://code.wireshark.org/review/17940
Reviewed-by: Roland Knall <rknall@gmail.com>
2016-10-01 13:18:51 +00:00