aboutsummaryrefslogtreecommitdiffstats
path: root/ui/qt/interface_frame.cpp
AgeCommit message (Collapse)AuthorFilesLines
2017-11-23Qt: Make InterfaceFrame use QFrameStig Bjørlykke1-1/+1
It's no need for InterfaceFrame to use AccordionFrame. Change-Id: Iccef1bcf919d7e5ec2bf818802ef68c1faf4e4a3 Reviewed-on: https://code.wireshark.org/review/24548 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot Reviewed-by: Roland Knall <rknall@gmail.com>
2017-07-26Qt: Create models directoryRoland Knall1-2/+2
Following the move for widgets and utils directory, moving models and delegates to the utils directory. Guidelines for this directory are: - Implementation of a model - Implementation of a delegate - Utility class for data storage used by a model Note: additionally all includes affected by this move have been changed to absolute path includes, instead of relative ones. Change-Id: I3bb868af7d3570437682b722a0cd46c906628570 Reviewed-on: https://code.wireshark.org/review/22790 Reviewed-by: Roland Knall <rknall@gmail.com>
2017-07-26Qt: Move utils to separate utils directoryRoland Knall1-1/+1
Following the move for widgets directory, moving utils to the utils directory. Guidelines for this directory are: - Generic use but not a widget - Utility functionality used by many classes Note: additionally all includes affected by this move have been changed to absolute path includes, instead of relative ones. Change-Id: I019ae4b6e6f6d06a5745a63ed195edbd36fb936b Reviewed-on: https://code.wireshark.org/review/22602 Petri-Dish: Roland Knall <rknall@gmail.com> Reviewed-by: Roland Knall <rknall@gmail.com>
2017-07-17Qt: More Main Welcome interface tweaks.Gerald Combs1-1/+10
ge036f4a282 didn't ensure that an interface was selected at app startup. Change-Id: I0b04020a344aaf8e35766a45287fe263d1227c64 Reviewed-on: https://code.wireshark.org/review/22656 Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Gerald Combs <gerald@wireshark.org>
2017-07-15Qt: Main Welcome behavior tweaks.Gerald Combs1-0/+5
Update the recent item list and interface tree style sheets so that hovered items have a different background color. This should make it more obvious that they can be clicked. Select the default interface (or failing that, the first interface) at application startup and focus on the interface tree. This should make it less likely that the user will start typing in a capture filter with the wrong (or no) interface selected. Note that we should probably track selected interfaces in the recent file instead of forcing the user to select one via the preferences. This should hopefully address some of the issues in bug 12636 and do so without changing the layout (which we can do in another commit). Change-Id: I96a417973f4270a70f41d04c40c4947a09613bdc Ping-Bug: 12636 Reviewed-on: https://code.wireshark.org/review/22627 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: Anders Broman <a.broman58@gmail.com>
2017-04-25Qt: fix compilation without pcap.Dario Lombardo1-0/+1
Change-Id: Ia0fe79157f21fd0b1c0e5195c902ae07c55ca253 Reviewed-on: https://code.wireshark.org/review/21343 Petri-Dish: Dario Lombardo <lomato@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-04-20memory leak: Qt code doesn't pass 'parent' argument to some Qt class ↵Max Dmitrichenko1-1/+1
constructors found with valgrind Change-Id: I2d73bd50a6f0e13b1817c8a518189c0e56558f72 Reviewed-on: https://code.wireshark.org/review/21227 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Reviewed-by: Jaap Keuter <jaap.keuter@xs4all.nl> Petri-Dish: Jaap Keuter <jaap.keuter@xs4all.nl> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2017-03-29Qt: propagate selection from main screen to dialogPeter Wu1-0/+2
Ensure that the selection in main screen is updated on refreshing interfaces (InterfaceFrame::interfaceListChanged). Add additional patches to ensure that selection changes from the main screen propagate to the dialog and be careful to avoid infinite recursions. Life of a signal for InterfaceFrame: ui->interfaceTree->selectionModel emits selectionChanged -> slot InterfaceFrame::interfaceTreeSelectionChanged -> emits InterfaceFrame::itemSelectionChanged -> slot MainWelcome::interfaceSelected -> emits MainWelcome::interfacesChanged -> slot CaptureInterfacesDialog::interfaceSelected (updats dialog selection) Life of a signal for CaptureInterfacesDialog: ui->interfaceTree emits itemSelectionChanged -> slot CaptureInterfacesDialog::interfaceSelected (emission of next signal because sender is ui->interfaceTree) -> emits CaptureInterfacesDialog::interfacesChanged -> slot InterfaceFrame::updateSelectedInterfaces (updates main screen selection) This should probably be updated to model/view with shared selection model in the future. Change-Id: Ibb32c201a92bd2f1310523b3e6e63b03209c9ce4 Reviewed-on: https://code.wireshark.org/review/20487 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org> Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2017-03-15Qt: Disable "Show hidden interfaces"Stig Bjørlykke1-0/+3
Disable the "Show hidden interface" option until bug 13354 is fixed because it's not possible to capture from hidden interfaces yet. Ping-Bug: 13354 Change-Id: I428c2698485f0c7c2d9a8ab8408d7129af5fecf1 Reviewed-on: https://code.wireshark.org/review/20528 Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2016-12-27InterfaceList: Add check for remote interfaceRoland Knall1-0/+19
Add a check, to allow the filtering of remote only interfaces. Also add the necessary options to the type menu. Change-Id: Ib82519362454094f64abf1cbe6d7bc917990d7ac Reviewed-on: https://code.wireshark.org/review/19438 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-26InterfaceList: Make storing preferences optionalRoland Knall1-1/+1
If multiple proxy models are used, not all should change the preferences if types are being displayed or hidden. Only the main list should have that option. Change-Id: I8617e402b6608eda98d7ecc0167cd0ccc3c43eaa Reviewed-on: https://code.wireshark.org/review/18470 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-20InterfaceList: Add button to toggle hidden interfacesRoland Knall1-0/+14
Add a button to the context menu, to allow for easy display of hidden interfaces, and make that a storable preference Change-Id: I8df5562b3ce8119b0ed38f9893c1879127f40c47 Reviewed-on: https://code.wireshark.org/review/18005 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-19InterfaceTree: Change foreach to const_iteratorRoland Knall1-10/+14
Change all occurences of the foreach macro to while loops with const_iterator for performance reasons Change-Id: I1cd378696136b3d6cc100b9bfff95295baa2ff83 Reviewed-on: https://code.wireshark.org/review/18286 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-10-17InterfaceList: Change Buttons to comboboxRoland Knall1-47/+49
Change the buttons to a combobox selector, and move that selector to the right of the capture filter box. Bug: 12971 Change-Id: Ib85d51cca128ed76eb08886e92660ede51d5982f Reviewed-on: https://code.wireshark.org/review/18186 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-13Interface List: Fix display of zero entriesRoland Knall1-12/+15
If WS is started with zero entries, no text is being displayed, and pushing a button does not yield the display of the list. This fixes it. Change-Id: I70b0637e5f95e805b54780afb7eb2e43b3e5f21c Reviewed-on: https://code.wireshark.org/review/18180 Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Roland Knall <rknall@gmail.com> Tested-by: Roland Knall <rknall@gmail.com>
2016-10-07Interface View/Model: Correct column orderingRoland Knall1-9/+6
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-03Interface List: Allow column filtering in modelRoland Knall1-82/+20
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-02Interface List: Fix build for no PCAP buildsRoland Knall1-4/+8
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-02Interface List: Hide button for only one interfaceRoland Knall1-9/+11
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-01Interface List: Change display to view/modelRoland Knall1-0/+395
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>