|
Wireshark 4.7.0
The Wireshark network protocol analyzer
|
A QTabWidget class, providing tap information. More...
#include <traffic_tab.h>
Public Slots | |
| void | useAbsoluteTime (bool absolute) |
| Use absolute time for the time columns. | |
| void | limitToDisplayFilter (bool limit) |
| Limits the displayed data to the active display filter. | |
| void | setMachineReadable (bool machine) |
| Configures output presentation to be machine readable. | |
| void | setOpenTabs (QList< int > protocols) |
| Opens specific protocol tabs based on a list. | |
Signals | |
| void | filterAction (QString filter, FilterAction::Action action, FilterAction::ActionType type) |
| Signal emitted to trigger a filter action. | |
| void | tabDataChanged (int idx, int selcounter) |
| Signal emitted when the tab data has changed. | |
| void | retapRequired () |
| Signal emitted when a retap operation is required. | |
| void | disablingTaps () |
| Signal emitted to notify that taps are being disabled. | |
| void | tabsChanged (QList< int > protocols) |
| Signal emitted when the open tabs have changed. | |
| void | columnsHaveChanged (QList< int > columns) |
| Signal emitted when the column configuration has changed. | |
Public Member Functions | |
| TrafficTab (QWidget *parent=nullptr) | |
| Constructs a new TrafficTab widget. | |
| virtual | ~TrafficTab () |
| Destroys the TrafficTab widget. | |
| void | setProtocolInfo (QString tableName, TrafficTypesList *trafficList, GList **recentList, GList **recentColumnList, ATapModelCallback createModel) |
| Set the Protocol Info for the traffic tab. | |
| void | setDelegate (ATapCreateDelegate createDelegate) |
| Set the Delegate object for the tab. It will apply for all models residing in this tab object. | |
| void | setFilter (QString filter=QString()) |
| Set the filter or remove it by providing an empty filter. | |
| void | setNameResolution (bool checked) |
| Enable/Disable name resolution for the address column. | |
| void | disableTap () |
| Disables the taps for this traffic tab. | |
| QMenu * | createCopyMenu (QWidget *parent=nullptr) |
| Create a menu containing clipboard copy entries for this tab. | |
| bool | hasNameResolution (int tabIdx=-1) |
| Checks, wether the given tabpage support name resolution on the address column. | |
| QVariant | currentItemData (int role=Qt::DisplayRole) |
| Return the itemData for the currently selected index in the currently displayed treeview. | |
| qlonglong | countSelectedItems (int role=Qt::DisplayRole) |
| Return the number of currently selected items in the currently displayed treeview. | |
| QList< QList< QVariant > > | selectedItemsIOGData () |
| Return a list of IOGraph related data, for the currently selected index or indexes in the currently displayed treeview. | |
| void | useNanosecondTimestamps (bool useNSTime) |
| Use nanosecond timestamps if requested. | |
| ATapDataModel * | dataModelForTabIndex (int tabIdx=-1) |
| Retrieves the tap data model for a specific tab index. | |
Public Member Functions inherited from DetachableTabWidget | |
| DetachableTabWidget (QWidget *parent=nullptr) | |
| Constructs a new DetachableTabWidget. | |
| QString | tabBasename () const |
| Retrieves the base name used when generating detached tab titles. | |
Protected Slots | |
| virtual void | detachTab (int idx, QPoint pos) override |
| Slot called to detach a tab into its own window. | |
| virtual void | attachTab (QWidget *content, QString name) override |
| Slot called to reattach a previously detached tab. | |
Protected Slots inherited from DetachableTabWidget | |
| virtual void | moveTab (int from, int to) |
| Moves a tab from one index to another. | |
| virtual void | detachTab (int tabIdx, QPoint pos) |
| Detaches a tab into its own separate dialog window. | |
| virtual void | attachTab (QWidget *content, QString name) |
| Attaches a previously detached widget back into the tab widget. | |
Additional Inherited Members | |
Protected Member Functions inherited from DetachableTabWidget | |
| void | setTabBasename (QString newName) |
| Sets the base name used when generating detached tab titles. | |
A QTabWidget class, providing tap information.
This class combines all required information, to display tapped data to the user. Specifically it handles all model data internally, therefore removing the need of the dialog to know how data is being stored or generated.
| TrafficTab::TrafficTab | ( | QWidget * | parent = nullptr | ) |
Constructs a new TrafficTab widget.
| parent | The parent widget. |
|
overrideprotectedvirtualslot |
Slot called to reattach a previously detached tab.
| content | The widget content to reattach. |
| name | The name of the tab. |
|
signal |
Signal emitted when the column configuration has changed.
| columns | List of active columns. |
| qlonglong TrafficTab::countSelectedItems | ( | int | role = Qt::DisplayRole | ) |
Return the number of currently selected items in the currently displayed treeview.
| role | the role to be used, defaults to Qt::DisplayRole |
| QMenu * TrafficTab::createCopyMenu | ( | QWidget * | parent = nullptr | ) |
Create a menu containing clipboard copy entries for this tab.
It will create all entries, including copying the content of the currently selected tab to CSV, YAML and JSON
| parent | the parent object or null |
| QVariant TrafficTab::currentItemData | ( | int | role = Qt::DisplayRole | ) |
Return the itemData for the currently selected index in the currently displayed treeview.
| role | the role to be used, defaults to Qt::DisplayRole |
| ATapDataModel * TrafficTab::dataModelForTabIndex | ( | int | tabIdx = -1 | ) |
Retrieves the tap data model for a specific tab index.
| tabIdx | The tab index, or current index if -1. |
|
overrideprotectedvirtualslot |
Slot called to detach a tab into its own window.
| idx | The index of the tab to detach. |
| pos | The position to place the new window. |
| void TrafficTab::disableTap | ( | ) |
Disables the taps for this traffic tab.
Disables all taps for models used by this traffic tab. They cannot be re-enabled on purpose, as in most cases, disabling them is being done during closing of the original capture file. This also disabled all filter actions, as well as the tap selection button.
|
signal |
Signal emitted to trigger a filter action.
| filter | The filter string. |
| action | The specific action to take. |
| type | The type of the filter action. |
| bool TrafficTab::hasNameResolution | ( | int | tabIdx = -1 | ) |
Checks, wether the given tabpage support name resolution on the address column.
| tabIdx | the index of the page. If it is out of bounds or < 0, the current index is being used |
|
slot |
Limits the displayed data to the active display filter.
| limit | True to apply the display filter constraint. |
| QList< QList< QVariant > > TrafficTab::selectedItemsIOGData | ( | ) |
| void TrafficTab::setDelegate | ( | ATapCreateDelegate | createDelegate | ) |
Set the Delegate object for the tab. It will apply for all models residing in this tab object.
| createDelegate | the callback for the delegate creation |
| void TrafficTab::setFilter | ( | QString | filter = QString() | ) |
Set the filter or remove it by providing an empty filter.
This differs from filtering the model itself in such a way, that filtering is being done using the epan system. Therefore, once filtered, the only way to get all elements back is to set an empty string.
| filter | the string to be filtered on |
|
slot |
Configures output presentation to be machine readable.
| machine | True to enable machine readable formatting. |
| void TrafficTab::setNameResolution | ( | bool | checked | ) |
Enable/Disable name resolution for the address column.
| checked | true to enable name resolution |
|
slot |
Opens specific protocol tabs based on a list.
| protocols | List of protocol IDs to open tabs for. |
| void TrafficTab::setProtocolInfo | ( | QString | tableName, |
| TrafficTypesList * | trafficList, | ||
| GList ** | recentList, | ||
| GList ** | recentColumnList, | ||
| ATapModelCallback | createModel | ||
| ) |
Set the Protocol Info for the traffic tab.
This has to be called right after instantiating the class. The reason this is not done inside the constructor is such, that the object can be used with Qt Designer without having to removing the predefined object during setup of the UI.
| tableName | The name for the table. Used for the protocol selection button |
| trafficList | an element of traffictypeslist, which handles all profile selections |
| recentColumnList | a list of columns to be displayed for this traffic type |
| createModel | A callback, which will create the correct model for the trees |
|
signal |
Signal emitted when the tab data has changed.
| idx | The tab index. |
| selcounter | The count of selected items. |
|
signal |
Signal emitted when the open tabs have changed.
| protocols | List of protocol IDs currently open. |
|
slot |
Use absolute time for the time columns.
| absolute | true if absolute time should be used |
| void TrafficTab::useNanosecondTimestamps | ( | bool | useNSTime | ) |
Use nanosecond timestamps if requested.
| useNSTime | use nanosecond timestamps if required and requested |