Wireshark 4.7.3
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
capture_info_dialog.h
Go to the documentation of this file.
1
9
10#ifndef CAPTURE_INFO_DIALOG_H
11#define CAPTURE_INFO_DIALOG_H
12
14
15#include <QAbstractTableModel>
16#include <QElapsedTimer>
17
18struct _capture_info;
19struct _capture_session;
20
21namespace Ui {
22class CaptureInfoDialog;
23}
24
28class CaptureInfoModel : public QAbstractTableModel
29{
30 Q_OBJECT
31
32public:
38 explicit CaptureInfoModel(struct _capture_info *cap_info, QObject * parent = Q_NULLPTR);
39
43 virtual ~CaptureInfoModel() {}
44
48 void updateInfo();
49
55 virtual int rowCount(const QModelIndex &parent = QModelIndex()) const override;
56
62 virtual int columnCount(const QModelIndex &parent = QModelIndex()) const override;
63
70 virtual QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
71// virtual QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const;
72
73private:
75 struct _capture_info *cap_info_;
76
78 int samples_;
79
80 // The SparkLineDelegate expects to plot ints. The delta between packet
81 // counts in two intervals should fit in an int, even if the totals don't.
83 QMap<int, uint64_t> last_count_;
84
86 QMap<int, QList<int> > points_;
87
89 uint64_t last_other_;
90
92 QList<int> other_points_;
93};
94
99{
100 Q_OBJECT
101
102public:
109 explicit CaptureInfoDialog(struct _capture_info *cap_info, struct _capture_session *cap_session, QWidget *parent = 0);
110
115
119 void updateInfo(void);
120
121signals:
122
123public slots:
124
125private slots:
129 void stopCapture();
130
131private:
133 Ui::CaptureInfoDialog *ui;
134
136 struct _capture_info *cap_info_;
137
139 struct _capture_session *cap_session_;
140
142 CaptureInfoModel *ci_model_;
143
145 QElapsedTimer duration_;
146};
147
148#endif // CAPTURE_INFO_DIALOG_H
void updateInfo(void)
Updates the dialog with the latest capture information.
Definition capture_info_dialog.cpp:115
~CaptureInfoDialog()
Destroys the CaptureInfoDialog.
Definition capture_info_dialog.cpp:109
CaptureInfoDialog(struct _capture_info *cap_info, struct _capture_session *cap_session, QWidget *parent=0)
Constructs a new CaptureInfoDialog.
Definition capture_info_dialog.cpp:87
A table model for displaying active capture information and statistics.
Definition capture_info_dialog.h:29
virtual ~CaptureInfoModel()
Destroys the CaptureInfoModel.
Definition capture_info_dialog.h:43
virtual int columnCount(const QModelIndex &parent=QModelIndex()) const override
Returns the number of columns under the given parent.
Definition capture_info_dialog.cpp:179
virtual int rowCount(const QModelIndex &parent=QModelIndex()) const override
Returns the number of rows under the given parent.
Definition capture_info_dialog.cpp:173
void updateInfo()
Updates the model with the latest capture information.
Definition capture_info_dialog.cpp:144
CaptureInfoModel(struct _capture_info *cap_info, QObject *parent=Q_NULLPTR)
Constructs a new CaptureInfoModel.
Definition capture_info_dialog.cpp:136
virtual QVariant data(const QModelIndex &index, int role=Qt::DisplayRole) const override
Retrieves data from the model for the given index and role.
Definition capture_info_dialog.cpp:184
GeometryStateDialog(QWidget *parent, Qt::WindowFlags f=Qt::Window)
Constructs a new GeometryStateDialog with the specified parent and window flags.
Definition geometry_state_dialog.h:91
Definition capinfos.c:186
Opaque handle representing an active or pending capture session.
Definition capture_session.h:156