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;
53 QVariant
data (
const QModelIndex &index,
int role = Qt::DisplayRole)
const;
62 bool setData(
const QModelIndex &index,
const QVariant &value,
int role = Qt::EditRole);
69 Qt::ItemFlags
flags(
const QModelIndex &index)
const;
88 QModelIndex index(
int row,
int column,
const QModelIndex &parent = QModelIndex())
const;
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;
A proxy model that caches edits and additions to the interface tree before applying them to the sourc...
Definition interface_tree_cache_model.h:25
bool setData(const QModelIndex &index, const QVariant &value, int role=Qt::EditRole)
Sets data in the cache for a given index and role.
Definition interface_tree_cache_model.cpp:390
Qt::ItemFlags flags(const QModelIndex &index) const
Retrieves the item flags for a given index, taking cache rules into account.
Definition interface_tree_cache_model.cpp:366
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:55
~InterfaceTreeCacheModel()
Destroys the InterfaceTreeCacheModel.
Definition interface_tree_cache_model.cpp:44
QVariant data(const QModelIndex &index, int role=Qt::DisplayRole) const
Retrieves data from the cache or source model for a given index and role.
Definition interface_tree_cache_model.cpp:425
int rowCount(const QModelIndex &parent=QModelIndex()) const
Returns the number of rows under a given parent.
Definition interface_tree_cache_model.cpp:277
A table model representing the system's available capture interfaces.
Definition interface_tree_model.h:67
InterfaceTreeColumns
Column indices for the interface tree model shared across interface-related views.
Definition interface_tree_model.h:42
Definition androiddump.c:219