12#ifndef INTERFACE_TREE_MODEL_H
13#define INTERFACE_TREE_MODEL_H
23#include <QAbstractTableModel>
26#include <QItemSelection>
28typedef QList<int> PointList;
89 int rowCount(
const QModelIndex &parent = QModelIndex())
const override;
96 int columnCount(
const QModelIndex &parent = QModelIndex())
const override;
104 QVariant
data (
const QModelIndex &index,
int role = Qt::DisplayRole)
const override;
113 QVariant
headerData(
int section, Qt::Orientation orientation,
int role)
const override;
153#ifdef HAVE_PCAP_REMOTE
159 bool isRemote(
int idx);
179 void connectInterfaceListManager();
182 void onStatisticsUpdated();
185 void onActivityChanged();
193 QVariant toolTipForInterface(
int idx)
const;
GUI-thread facade that owns the interface-statistics sampler and is the single source of truth for pe...
Definition interface_statistics.h:50
QVariant headerData(int section, Qt::Orientation orientation, int role) const override
Retrieves the header data for a specific section and role.
Definition interface_tree_model.cpp:283
void setStatistics(InterfaceStatistics *statistics)
Sets the statistics provider supplying sparkline/activity data.
Definition interface_tree_model.cpp:421
bool updateSelectedDevices(QItemSelection sourceSelection)
Updates the internal state of selected devices based on a UI selection.
Definition interface_tree_model.cpp:477
int columnCount(const QModelIndex &parent=QModelIndex()) const override
Returns the number of columns in the table model.
Definition interface_tree_model.cpp:115
~InterfaceTreeModel()
Destroys the InterfaceTreeModel.
Definition interface_tree_model.cpp:59
InterfaceTreeModel(QObject *parent)
Constructs a new InterfaceTreeModel.
Definition interface_tree_model.cpp:46
QString interfaceError()
Retrieves any current interface-related error messages.
Definition interface_tree_model.cpp:71
QVariant data(const QModelIndex &index, int role=Qt::DisplayRole) const override
Retrieves data from the model for a given index and role.
Definition interface_tree_model.cpp:121
void interfaceListChanged()
Slot triggered when the global list of available interfaces changes.
Definition interface_tree_model.cpp:363
int rowCount(const QModelIndex &parent=QModelIndex()) const override
Returns the number of rows (interfaces) under a given parent.
Definition interface_tree_model.cpp:105
static const QString DefaultNumericValue
Definition interface_tree_model.h:163
QItemSelection selectedDevices()
Retrieves the currently selected devices as an item selection.
Definition interface_tree_model.cpp:456
QVariant getColumnContent(int idx, int col, int role=Qt::DisplayRole)
Gets the content for a specific column and row directly.
Definition interface_tree_model.cpp:343
InterfaceTreeColumns
Column indices for the interface tree model shared across interface-related views.
Definition interface_tree_model.h:44
@ IFTREE_COL_ACTIVE
Definition interface_tree_model.h:56
@ IFTREE_COL_TYPE
Definition interface_tree_model.h:55
@ IFTREE_COL_COMMENT
Definition interface_tree_model.h:51
@ IFTREE_COL_DLT
Definition interface_tree_model.h:53
@ IFTREE_COL_EXTCAP
Definition interface_tree_model.h:45
@ IFTREE_COL_NAME
Definition interface_tree_model.h:50
@ IFTREE_COL_EXTCAP_PATH
Definition interface_tree_model.h:46
@ IFTREE_COL_BUFFERLEN
Definition interface_tree_model.h:58
@ IFTREE_COL_STATS
Definition interface_tree_model.h:52
@ IFTREE_COL_SNAPLEN
Definition interface_tree_model.h:57
@ IFTREE_COL_HIDDEN
Definition interface_tree_model.h:47
@ IFTREE_COL_PROMISCUOUSMODE
Definition interface_tree_model.h:54
@ IFTREE_COL_MAX
Definition interface_tree_model.h:62
@ IFTREE_COL_DESCRIPTION
Definition interface_tree_model.h:49
@ IFTREE_COL_CAPTURE_FILTER
Definition interface_tree_model.h:60
@ IFTREE_COL_PIPE_PATH
Definition interface_tree_model.h:61
@ IFTREE_COL_MONITOR_MODE
Definition interface_tree_model.h:59
@ IFTREE_COL_DISPLAY_NAME
Definition interface_tree_model.h:48