blob: 0de46f9587af2768598bb3324a873c4384131c5f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
#ifndef PACKETSTABLEWIDGET_H
#define PACKETSTABLEWIDGET_H
#include <QTableWidget>
#include "pcapplusplus.h"
class PacketsTableWidget : public QTableWidget
{
Q_OBJECT
public:
PacketsTableWidget(QWidget *parent = nullptr);
bool isEthernetSrcColumn(const int& column) {
return column == 6;
};
bool isEthernetDstColumn(const int& column) {
return column == 7;
};
bool isIpSrcColumn(const int& column) {
return column == 8;
};
bool isIpDstColumn(const int& column) {
return column == 9;
};
bool isPortSrcColumn(const int& column) {
return column == 10;
};
bool isPortDstColumn(const int& column) {
return column == 11;
};
private:
bool addTableRow(PcapPlusPlus *ppp);
bool updateTableRow(size_t index, PcapPlusPlus *ppp);
signals:
bool addRow(PcapPlusPlus *ppp);
bool updateRow(size_t index, PcapPlusPlus *ppp);
public slots:
void randomizeLayerItem(PcapPlusPlus *ppp);
void setLayerItem(QTableWidgetItem *item, PcapPlusPlus *ppp, bool isProcessing);
};
#endif // PACKETSTABLEWIDGET_H
|