| Wireshark 4.7.0 The Wireshark network protocol analyzer

Loading...
Searching...
No Matches
Public Slots | Signals | Public Member Functions | Protected Slots | List of all members
TrafficTab Class Reference

A QTabWidget class, providing tap information. More...

`#include <traffic_tab.h>`

Inheritance diagram for TrafficTab:

## Public Slots
void | useAbsoluteTime (bool absolute)
| Use absolute time for the time columns.
void | limitToDisplayFilter (bool limit)
void | setMachineReadable (bool machine)
void | setOpenTabs (QList< int > protocols)

## Signals
void | filterAction (QString filter, FilterAction::Action action, FilterAction::ActionType type)
void | tabDataChanged (int idx, int selcounter)
void | retapRequired ()
void | disablingTaps ()
void | tabsChanged (QList< int > protocols)
void | columnsHaveChanged (QList< int > columns)

## Public Member Functions
| TrafficTab (QWidget *parent=nullptr)
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)
Public Member Functions inherited from DetachableTabWidget
| DetachableTabWidget (QWidget *parent=nullptr)
QString | tabBasename () const

## Protected Slots
virtual void | detachTab (int idx, QPoint pos) override
virtual void | attachTab (QWidget *content, QString name) override
Protected Slots inherited from DetachableTabWidget
virtual void | moveTab (int from, int to)
virtual void | detachTab (int tabIdx, QPoint pos)
virtual void | attachTab (QWidget *content, QString name)

## Additional Inherited Members
Protected Member Functions inherited from DetachableTabWidget
void | setTabBasename (QString newName)

## Detailed Description

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.

## Member Function Documentation

## ◆ countSelectedItems()

qlonglong TrafficTab::countSelectedItems | ( | int | role = `Qt::DisplayRole` | ) |

Return the number of currently selected items in the currently displayed treeview.

Parameters

  role | the role to be used, defaults to Qt::DisplayRole

Returns
  qlonglong the number of selected items

## ◆ createCopyMenu()

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

Parameters

  parent | the parent object or null

Returns
  QMenu* the resulting menu or null

## ◆ currentItemData()

QVariant TrafficTab::currentItemData | ( | int | role = `Qt::DisplayRole` | ) |

Return the itemData for the currently selected index in the currently displayed treeview.

Parameters

  role | the role to be used, defaults to Qt::DisplayRole

Returns
  QVariant the resulting value as QVariant type

## ◆ disableTap()

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.

## ◆ hasNameResolution()

bool TrafficTab::hasNameResolution | ( | int | tabIdx = `-1` | ) |

Checks, wether the given tabpage support name resolution on the address column.

Parameters

  tabIdx | the index of the page. If it is out of bounds or < 0, the current index is being used

Returns
  true if name resolution is being supported
  false if name resolution is not supported

## ◆ selectedItemsIOGData()

QList< QList< QVariant > > TrafficTab::selectedItemsIOGData | ( |  | ) |

Return a list of IOGraph related data, for the currently selected index or indexes in the currently displayed treeview.

Returns
  QList of IOGraph related data expressed in QVariant types

## ◆ setDelegate()

void TrafficTab::setDelegate | ( | ATapCreateDelegate | createDelegate | ) |

Set the Delegate object for the tab. It will apply for all models residing in this tab object.

Parameters

  createDelegate | the callback for the delegate creation

See also
  ATapCreateDelegate

## ◆ setFilter()

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.

Note
  Filtering will only work, as long as the capture file remains open. If taps have been disabled and capture has stopped, filtering will no longer work.

Parameters

  filter | the string to be filtered on

## ◆ setNameResolution()

void TrafficTab::setNameResolution | ( | bool | checked | ) |

Enable/Disable name resolution for the address column.

Parameters

  checked | true to enable name resolution

## ◆ setProtocolInfo()

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.

Parameters

  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

See also
  ATapModelCallback

## ◆ useAbsoluteTime

void TrafficTab::useAbsoluteTime | ( | bool | absolute | ) |
| slot

Use absolute time for the time columns.

Parameters

  absolute | true if absolute time should be used

## ◆ useNanosecondTimestamps()

void TrafficTab::useNanosecondTimestamps | ( | bool | useNSTime | ) |

Use nanosecond timestamps if requested.

Parameters

  useNSTime | use nanosecond timestamps if required and requested

The documentation for this class was generated from the following files:

- /builds/wireshark/wireshark/ui/qt/widgets/traffic_tab.h
- /builds/wireshark/wireshark/ui/qt/widgets/traffic_tab.cpp