Wireshark 4.5.0
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
interface_tree_cache_model.h
Go to the documentation of this file.
1
12#ifndef INTERFACE_TREE_CACHE_MODEL_H_
13#define INTERFACE_TREE_CACHE_MODEL_H_
14
16
17#include <QMap>
18#include <QAbstractItemModel>
19#include <QIdentityProxyModel>
20
21class InterfaceTreeCacheModel : public QIdentityProxyModel
22{
23 Q_OBJECT
24
25public:
26 explicit InterfaceTreeCacheModel(QObject *parent);
28
29 int rowCount(const QModelIndex &parent = QModelIndex()) const;
30 QVariant data (const QModelIndex &index, int role = Qt::DisplayRole) const;
31
32 bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::EditRole);
33 Qt::ItemFlags flags(const QModelIndex &index) const;
34
35 QVariant getColumnContent(int idx, int col, int role = Qt::DisplayRole);
36
37#ifdef HAVE_LIBPCAP
38 QModelIndex index(int row, int column, const QModelIndex &parent = QModelIndex()) const;
39
40 void reset(int row);
41 void save();
42
43 void addDevice(const interface_t * newDevice);
44 void deleteDevice(const QModelIndex &index);
45#endif
46
47#ifdef HAVE_PCAP_REMOTE
48 bool isRemote(const QModelIndex &index) const;
49#endif
50
51private:
52 InterfaceTreeModel * sourceModel;
53
54#ifdef HAVE_LIBPCAP
55 QList<interface_t> newDevices;
56
57 void saveNewDevices();
58#endif
59 QMap<int, QSharedPointer<QMap<InterfaceTreeColumns, QVariant> > > * storage;
60 QList<InterfaceTreeColumns> editableColumns;
61 QList<InterfaceTreeColumns> checkableColumns;
62
63#ifdef HAVE_LIBPCAP
64 const interface_t * lookup(const QModelIndex &index) const;
65#endif
66
67 bool changeIsAllowed(InterfaceTreeColumns col) const;
68 bool isAvailableField(const QModelIndex &index) const;
69 bool isAllowedToBeEdited(const QModelIndex &index) const;
70
71};
72#endif /* INTERFACE_TREE_CACHE_MODEL_H_ */
Definition interface_tree_cache_model.h:22
Definition interface_tree_model.h:66
Definition androiddump.c:218