Revert "TODO epan/dissectors/asn1/kerberos/packet-kerberos-template.c new GSS flags"
[wireshark-sm.git] / ui / qt / capture_info_dialog.h
blobb3c4b81a057ed1c830881e8eea5dc786dbddc4a6
1 /** @file
3 * Wireshark - Network traffic analyzer
4 * By Gerald Combs <gerald@wireshark.org>
5 * Copyright 1998 Gerald Combs
7 * SPDX-License-Identifier: GPL-2.0-or-later
8 */
10 #ifndef CAPTURE_INFO_DIALOG_H
11 #define CAPTURE_INFO_DIALOG_H
13 #include "geometry_state_dialog.h"
15 #include <QAbstractTableModel>
16 #include <QElapsedTimer>
18 struct _capture_info;
19 struct _capture_session;
21 namespace Ui {
22 class CaptureInfoDialog;
25 class CaptureInfoModel : public QAbstractTableModel
27 Q_OBJECT
29 public:
30 explicit CaptureInfoModel(struct _capture_info *cap_info, QObject * parent = Q_NULLPTR);
31 virtual ~CaptureInfoModel() {}
32 void updateInfo();
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;
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_;
50 class CaptureInfoDialog : public GeometryStateDialog
52 Q_OBJECT
54 public:
55 explicit CaptureInfoDialog(struct _capture_info *cap_info, struct _capture_session *cap_session, QWidget *parent = 0);
56 ~CaptureInfoDialog();
57 void updateInfo(void);
59 signals:
61 public slots:
63 private slots:
64 void stopCapture();
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_;
74 #endif // CAPTURE_INFO_DIALOG_H