12#ifndef INTERFACE_TREE_MODEL_H
13#define INTERFACE_TREE_MODEL_H
23#include <QAbstractTableModel>
26#include <QItemSelection>
28typedef QList<int> PointList;
87 int rowCount(
const QModelIndex &parent = QModelIndex())
const;
94 int columnCount(
const QModelIndex &parent = QModelIndex())
const;
102 QVariant
data (
const QModelIndex &index,
int role = Qt::DisplayRole)
const;
111 QVariant
headerData(
int section, Qt::Orientation orientation,
int role)
const;
124 void setCache(if_stat_cache_t *stat_cache);
129 void stopStatistic();
160#ifdef HAVE_PCAP_REMOTE
166 bool isRemote(
int idx);
184 QVariant toolTipForInterface(
int idx)
const;
187 QMap<QString, PointList> points;
190 QMap<QString, bool> active;
194 if_stat_cache_t *stat_cache_;
A table model representing the system's available capture interfaces.
Definition interface_tree_model.h:67
bool updateSelectedDevices(QItemSelection sourceSelection)
Updates the internal state of selected devices based on a UI selection.
Definition interface_tree_model.cpp:502
~InterfaceTreeModel()
Destroys the InterfaceTreeModel.
Definition interface_tree_model.cpp:52
QString interfaceError()
Retrieves any current interface-related error messages.
Definition interface_tree_model.cpp:62
int columnCount(const QModelIndex &parent=QModelIndex()) const
Returns the number of columns in the table model.
Definition interface_tree_model.cpp:106
QVariant headerData(int section, Qt::Orientation orientation, int role) const
Retrieves the header data for a specific section and role.
Definition interface_tree_model.cpp:269
void interfaceListChanged()
Slot triggered when the global list of available interfaces changes.
Definition interface_tree_model.cpp:349
int rowCount(const QModelIndex &parent=QModelIndex()) const
Returns the number of rows (interfaces) under a given parent.
Definition interface_tree_model.cpp:96
QVariant data(const QModelIndex &index, int role=Qt::DisplayRole) const
Retrieves data from the model for a given index and role.
Definition interface_tree_model.cpp:112
void updateStatistic(unsigned int row)
Triggers an update of the statistics (like sparklines) for a specific row.
Definition interface_tree_model.cpp:426
static const QString DefaultNumericValue
Definition interface_tree_model.h:170
QItemSelection selectedDevices()
Retrieves the currently selected devices as an item selection.
Definition interface_tree_model.cpp:481
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:329
InterfaceTreeColumns
Column indices for the interface tree model shared across interface-related views.
Definition interface_tree_model.h:42
@ IFTREE_COL_ACTIVE
Definition interface_tree_model.h:54
@ IFTREE_COL_TYPE
Definition interface_tree_model.h:53
@ IFTREE_COL_COMMENT
Definition interface_tree_model.h:49
@ IFTREE_COL_DLT
Definition interface_tree_model.h:51
@ IFTREE_COL_EXTCAP
Definition interface_tree_model.h:43
@ IFTREE_COL_NAME
Definition interface_tree_model.h:48
@ IFTREE_COL_EXTCAP_PATH
Definition interface_tree_model.h:44
@ IFTREE_COL_BUFFERLEN
Definition interface_tree_model.h:56
@ IFTREE_COL_STATS
Definition interface_tree_model.h:50
@ IFTREE_COL_SNAPLEN
Definition interface_tree_model.h:55
@ IFTREE_COL_HIDDEN
Definition interface_tree_model.h:45
@ IFTREE_COL_PROMISCUOUSMODE
Definition interface_tree_model.h:52
@ IFTREE_COL_MAX
Definition interface_tree_model.h:60
@ IFTREE_COL_DESCRIPTION
Definition interface_tree_model.h:47
@ IFTREE_COL_CAPTURE_FILTER
Definition interface_tree_model.h:58
@ IFTREE_COL_PIPE_PATH
Definition interface_tree_model.h:59
@ IFTREE_COL_MONITOR_MODE
Definition interface_tree_model.h:57
@ IFTREE_COL_DISPLAY_NAME
Definition interface_tree_model.h:46