Wireshark 4.7.0
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
capture_info_dialog.h
Go to the documentation of this file.
1
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 {
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;
56
62 virtual int columnCount(const QModelIndex &parent = QModelIndex()) const;
63
70 virtual QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;
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
A dialog displaying real-time information and statistics during a capture.
Definition capture_info_dialog.h:99
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
A table model for displaying active capture information and statistics.
Definition capture_info_dialog.h:29
virtual int rowCount(const QModelIndex &parent=QModelIndex()) const
Returns the number of rows under the given parent.
Definition capture_info_dialog.cpp:173
virtual int columnCount(const QModelIndex &parent=QModelIndex()) const
Returns the number of columns under the given parent.
Definition capture_info_dialog.cpp:179
virtual ~CaptureInfoModel()
Destroys the CaptureInfoModel.
Definition capture_info_dialog.h:43
void updateInfo()
Updates the model with the latest capture information.
Definition capture_info_dialog.cpp:144
A dialog that remembers its geometry and splitter state.
Definition geometry_state_dialog.h:20
Definition capinfos.c:186
Opaque handle representing an active or pending capture session.
Definition capture_session.h:142