Wireshark 4.5.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 | setOpenTabs (QList< int > protocols) |
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. | |
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) |
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.
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 |
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.
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 |
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 |
void TrafficTab::setNameResolution | ( | bool | checked | ) |
Enable/Disable name resolution for the address column.
checked | true to enable name resolution |
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 |
|
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 |