12#ifndef INTERFACE_TREE_CACHE_MODEL_H_
13#define INTERFACE_TREE_CACHE_MODEL_H_
18#include <QAbstractItemModel>
19#include <QIdentityProxyModel>
45 int rowCount(
const QModelIndex &parent = QModelIndex())
const override;
53 QVariant
data (
const QModelIndex &index,
int role = Qt::DisplayRole)
const override;
62 bool setData(
const QModelIndex &index,
const QVariant &value,
int role = Qt::EditRole)
override;
69 Qt::ItemFlags
flags(
const QModelIndex &index)
const override;
88 QModelIndex index(
int row,
int column,
const QModelIndex &parent = QModelIndex())
const override;
111 void deleteDevice(
const QModelIndex &index);
114#ifdef HAVE_PCAP_REMOTE
120 bool isRemote(
const QModelIndex &index)
const;
129 QList<interface_t> newDevices;
134 void saveNewDevices();
138 QMap<int, QSharedPointer<QMap<InterfaceTreeColumns, QVariant> > > * storage;
141 QList<InterfaceTreeColumns> editableColumns;
144 QList<InterfaceTreeColumns> checkableColumns;
152 const interface_t * lookup(
const QModelIndex &index)
const;
167 bool isAvailableField(
const QModelIndex &index)
const;
174 bool isAllowedToBeEdited(
const QModelIndex &index)
const;
QVariant data(const QModelIndex &index, int role=Qt::DisplayRole) const override
Retrieves data from the cache or source model for a given index and role.
Definition interface_tree_cache_model.cpp:430
InterfaceTreeCacheModel(QObject *parent)
Constructs a new InterfaceTreeCacheModel.
Definition interface_tree_cache_model.cpp:28
QVariant getColumnContent(int idx, int col, int role=Qt::DisplayRole)
Gets the cached content for a specific column and row.
Definition interface_tree_cache_model.cpp:57
bool setData(const QModelIndex &index, const QVariant &value, int role=Qt::EditRole) override
Sets data in the cache for a given index and role.
Definition interface_tree_cache_model.cpp:395
~InterfaceTreeCacheModel()
Destroys the InterfaceTreeCacheModel.
Definition interface_tree_cache_model.cpp:46
Qt::ItemFlags flags(const QModelIndex &index) const override
Retrieves the item flags for a given index, taking cache rules into account.
Definition interface_tree_cache_model.cpp:371
int rowCount(const QModelIndex &parent=QModelIndex()) const override
Returns the number of rows under a given parent.
Definition interface_tree_cache_model.cpp:282
A table model representing the system's available capture interfaces.
Definition interface_tree_model.h:69
InterfaceTreeColumns
Column indices for the interface tree model shared across interface-related views.
Definition interface_tree_model.h:44
Definition androiddump.c:219