| 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
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
25 class CaptureInfoModel : public QAbstractTableModel
26{
27 Q_OBJECT
28
29 public:
30 explicit CaptureInfoModel(struct _capture_info *cap_info, QObject * parent = Q_NULLPTR);
31 virtual ~CaptureInfoModel() {}
32 void updateInfo();
33
34 virtual int rowCount(const QModelIndex &parent = QModelIndex()) const;
35 virtual int columnCount(const QModelIndex &parent = QModelIndex()) const;
36 virtual QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;
37// virtual QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const;
38
39 private:
40 struct _capture_info *cap_info_;
41 int samples_;
42 // The SparkLineDelegate expects to plot ints. The delta between packet
43 // counts in two intervals should fit in an int, even if the totals don't.
44 QMap<int, uint64_t> last_count_;
45 QMap<int, QList<int> > points_;
46 uint64_t last_other_;
47 QList<int> other_points_;
48};
49
50 class CaptureInfoDialog : public GeometryStateDialog
51{
52 Q_OBJECT
53
54 public:
55 explicit CaptureInfoDialog(struct _capture_info *cap_info, struct _capture_session *cap_session, QWidget *parent = 0);
56 ~CaptureInfoDialog();
57 void updateInfo(void);
58
59signals:
60
61 public slots:
62
63 private slots:
64 void stopCapture();
65
66 private:
67 Ui::CaptureInfoDialog *ui;
68 struct _capture_info *cap_info_;
69 struct _capture_session *cap_session_;
70 CaptureInfoModel *ci_model_;
71 QElapsedTimer duration_;
72};
73
74#endif // CAPTURE_INFO_DIALOG_H
CaptureInfoDialog
Definition capture_info_dialog.h:51
CaptureInfoModel
Definition capture_info_dialog.h:26
GeometryStateDialog
Definition geometry_state_dialog.h:17
geometry_state_dialog.h
_capture_info
Definition capinfos.c:186
_capture_session
Definition capture_session.h:136