Wireshark 4.5.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:
DetachableTabWidget

Public Slots

void useAbsoluteTime (bool absolute)
 Use absolute time for the time columns.
 
void setOpenTabs (QList< int > protocols)
 

Signals

void filterAction (QString filter, FilterAction::Action action, FilterAction::ActionType type)
 
void tabDataChanged (int idx)
 
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.
 
void useNanosecondTimestamps (bool useNSTime)
 Use nanosecond timestamps if requested.
 
ATapDataModeldataModelForTabIndex (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

◆ 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
parentthe 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
rolethe 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
tabIdxthe 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

◆ 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
createDelegatethe 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
filterthe string to be filtered on

◆ setNameResolution()

void TrafficTab::setNameResolution ( bool  checked)

Enable/Disable name resolution for the address column.

Parameters
checkedtrue 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
tableNameThe name for the table. Used for the protocol selection button
trafficListan element of traffictypeslist, which handles all profile selections
recentColumnLista list of columns to be displayed for this traffic type
createModelA 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
absolutetrue if absolute time should be used

◆ useNanosecondTimestamps()

void TrafficTab::useNanosecondTimestamps ( bool  useNSTime)

Use nanosecond timestamps if requested.

Parameters
useNSTimeuse nanosecond timestamps if required and requested

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