| 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
13#include "geometry_state_dialog.h"
14
15#include <QAbstractTableModel>
16#include <QElapsedTimer>
17
18 struct _capture_info;
19 struct _capture_session;
20
21 namespace Ui {
22 class CaptureInfoDialog;
23}
24
28 class CaptureInfoModel : public QAbstractTableModel
29{
30 Q_OBJECT
31
32 public:
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
73 private:
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
98 class CaptureInfoDialog : public GeometryStateDialog
99{
100 Q_OBJECT
101
102 public:
109 explicit CaptureInfoDialog(struct _capture_info *cap_info, struct _capture_session *cap_session, QWidget *parent = 0);
110
114 ~CaptureInfoDialog();
115
119 void updateInfo(void);
120
121signals:
122
123 public slots:
124
125 private slots:
129 void stopCapture();
130
131 private:
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
CaptureInfoDialog::updateInfo
void updateInfo(void)
Updates the dialog with the latest capture information.
Definition capture_info_dialog.cpp:115
CaptureInfoDialog::~CaptureInfoDialog
~CaptureInfoDialog()
Destroys the CaptureInfoDialog.
Definition capture_info_dialog.cpp:109
CaptureInfoDialog::CaptureInfoDialog
CaptureInfoDialog(struct _capture_info *cap_info, struct _capture_session *cap_session, QWidget *parent=0)
Constructs a new CaptureInfoDialog.
Definition capture_info_dialog.cpp:87
CaptureInfoModel
A table model for displaying active capture information and statistics.
Definition capture_info_dialog.h:29
CaptureInfoModel::~CaptureInfoModel
virtual ~CaptureInfoModel()
Destroys the CaptureInfoModel.
Definition capture_info_dialog.h:43
CaptureInfoModel::columnCount
virtual int columnCount(const QModelIndex &parent=QModelIndex()) const override
Returns the number of columns under the given parent.
Definition capture_info_dialog.cpp:179
CaptureInfoModel::rowCount
virtual int rowCount(const QModelIndex &parent=QModelIndex()) const override
Returns the number of rows under the given parent.
Definition capture_info_dialog.cpp:173
CaptureInfoModel::updateInfo
void updateInfo()
Updates the model with the latest capture information.
Definition capture_info_dialog.cpp:144
CaptureInfoModel::CaptureInfoModel
CaptureInfoModel(struct _capture_info *cap_info, QObject *parent=Q_NULLPTR)
Constructs a new CaptureInfoModel.
Definition capture_info_dialog.cpp:136
CaptureInfoModel::data
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::GeometryStateDialog
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
geometry_state_dialog.h
_capture_info
Definition capinfos.c:185
_capture_session
Opaque handle representing an active or pending capture session.
Definition capture_session.h:156