18#include <ui/qt/widgets/detachable_tabwidget.h>
25#include <QAbstractItemDelegate>
26#include <QSortFilterProxyModel>
36typedef ATapDataModel * (*ATapModelCallback)(
int protoId, QString filter);
45typedef QAbstractItemDelegate * (*ATapCreateDelegate)(QWidget * parent);
159 void setFilter(QString filter = QString());
205 bool hasGeoIPData(
int tabIdx = -1);
214 QUrl createGeoIPMap(
bool onlyJSON,
int tabIdx = -1);
329 virtual void detachTab(
int idx, QPoint pos)
override;
336 virtual void attachTab(QWidget * content, QString name)
override;
340 QList<int> _allProtocols;
343 QMap<int, int> _tabs;
352 GList ** _recentList;
355 GList ** _recentColumnList;
361 bool _nameResolution;
367 bool _limitToDisplayFilter;
373 bool _machineReadable;
380 QTreeView * createTree(
int protoId);
408 void insertProtoTab(
int protoId,
bool emitSignals =
true);
415 void removeProtoTab(
int protoId,
bool emitSignals =
true);
439 void doCurrentIndexChange(
const QModelIndex & cur,
const QModelIndex & prev);
446 void doSelectionChange(
const QItemSelection &selected,
const QItemSelection &deselected);
DataModel for tap user data.
Definition atap_data_model.h:33
Action
Defines an action to be taken with a filter.
Definition filter_action.h:30
ActionType
Defines how the new filter should be combined with the existing one.
Definition filter_action.h:43
A simple class to store the data for a tab in the traffic tab widget.
Definition traffic_tab.h:51
TabData & operator=(const TabData &)=default
Copy assignment operator.
TabData()
Constructs a new empty TabData object.
Definition traffic_tab.cpp:48
int protoId() const
Retrieves the protocol ID.
Definition traffic_tab.cpp:63
TabData(const TabData &)=default
Copy constructor.
QString name() const
Retrieves the name of the tab.
Definition traffic_tab.cpp:58
Proxy model handling sorting, filtering, and column visibility for traffic data.
Definition traffic_tree.h:157
TrafficTab(QWidget *parent=nullptr)
Constructs a new TrafficTab widget.
Definition traffic_tab.cpp:69
QMenu * createCopyMenu(QWidget *parent=nullptr)
Create a menu containing clipboard copy entries for this tab.
Definition traffic_tab.cpp:653
void tabDataChanged(int idx, int selcounter)
Signal emitted when the tab data has changed.
void setDelegate(ATapCreateDelegate createDelegate)
Set the Delegate object for the tab. It will apply for all models residing in this tab object.
Definition traffic_tab.cpp:102
void filterAction(QString filter, FilterAction::Action action, FilterAction::ActionType type)
Signal emitted to trigger a filter action.
void setMachineReadable(bool machine)
Configures output presentation to be machine readable.
Definition traffic_tab.cpp:239
void disableTap()
Disables the taps for this traffic tab.
Definition traffic_tab.cpp:253
void columnsHaveChanged(QList< int > columns)
Signal emitted when the column configuration has changed.
void setOpenTabs(QList< int > protocols)
Opens specific protocol tabs based on a list.
Definition traffic_tab.cpp:266
void tabsChanged(QList< int > protocols)
Signal emitted when the open tabs have changed.
void useNanosecondTimestamps(bool useNSTime)
Use nanosecond timestamps if requested.
Definition traffic_tab.cpp:211
bool hasNameResolution(int tabIdx=-1)
Checks, wether the given tabpage support name resolution on the address column.
Definition traffic_tab.cpp:643
void setNameResolution(bool checked)
Enable/Disable name resolution for the address column.
Definition traffic_tab.cpp:623
QList< QList< QVariant > > selectedItemsIOGData()
Return a list of IOGraph related data, for the currently selected index or indexes in the currently d...
Definition traffic_tab.cpp:472
void disablingTaps()
Signal emitted to notify that taps are being disabled.
void setFilter(QString filter=QString())
Set the filter or remove it by providing an empty filter.
Definition traffic_tab.cpp:612
virtual void attachTab(QWidget *content, QString name) override
Slot called to reattach a previously detached tab.
Definition traffic_tab.cpp:829
qlonglong countSelectedItems(int role=Qt::DisplayRole)
Return the number of currently selected items in the currently displayed treeview.
Definition traffic_tab.cpp:449
ATapDataModel * dataModelForTabIndex(int tabIdx=-1)
Retrieves the tap data model for a specific tab index.
Definition traffic_tab.cpp:595
virtual void detachTab(int idx, QPoint pos) override
Slot called to detach a tab into its own window.
Definition traffic_tab.cpp:814
void useAbsoluteTime(bool absolute)
Use absolute time for the time columns.
Definition traffic_tab.cpp:197
QVariant currentItemData(int role=Qt::DisplayRole)
Return the itemData for the currently selected index in the currently displayed treeview.
Definition traffic_tab.cpp:431
void limitToDisplayFilter(bool limit)
Limits the displayed data to the active display filter.
Definition traffic_tab.cpp:225
void setProtocolInfo(QString tableName, TrafficTypesList *trafficList, GList **recentList, GList **recentColumnList, ATapModelCallback createModel)
Set the Protocol Info for the traffic tab.
Definition traffic_tab.cpp:88
void retapRequired()
Signal emitted when a retap operation is required.
Tree view widget that presents a filterable, sortable, checkable list of traffic-tap protocols and fo...
Definition traffic_types_list.h:229
ATapDataModel *(* ATapModelCallback)(int protoId, QString filter)
Callback for creating an ATapDataModel.
Definition traffic_tab.h:36
QAbstractItemDelegate *(* ATapCreateDelegate)(QWidget *parent)
Callback for creating an item delegate.
Definition traffic_tab.h:45