summaryrefslogtreecommitdiffstats
path: root/ui/qt/capture_info_dialog.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-10 20:34:10 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-10 20:34:10 +0000
commite4ba6dbc3f1e76890b22773807ea37fe8fa2b1bc (patch)
tree68cb5ef9081156392f1dd62a00c6ccc1451b93df /ui/qt/capture_info_dialog.h
parentInitial commit. (diff)
downloadwireshark-e4ba6dbc3f1e76890b22773807ea37fe8fa2b1bc.tar.xz
wireshark-e4ba6dbc3f1e76890b22773807ea37fe8fa2b1bc.zip
Adding upstream version 4.2.2.upstream/4.2.2
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'ui/qt/capture_info_dialog.h')
-rw-r--r--ui/qt/capture_info_dialog.h72
1 files changed, 72 insertions, 0 deletions
diff --git a/ui/qt/capture_info_dialog.h b/ui/qt/capture_info_dialog.h
new file mode 100644
index 0000000..da30d04
--- /dev/null
+++ b/ui/qt/capture_info_dialog.h
@@ -0,0 +1,72 @@
+/** @file
+ *
+ * Wireshark - Network traffic analyzer
+ * By Gerald Combs <gerald@wireshark.org>
+ * Copyright 1998 Gerald Combs
+ *
+ * SPDX-License-Identifier: GPL-2.0-or-later
+ */
+
+#ifndef CAPTURE_INFO_DIALOG_H
+#define CAPTURE_INFO_DIALOG_H
+
+#include "geometry_state_dialog.h"
+
+#include <QAbstractTableModel>
+#include <QElapsedTimer>
+
+struct _capture_info;
+struct _capture_session;
+
+namespace Ui {
+class CaptureInfoDialog;
+}
+
+class CaptureInfoModel : public QAbstractTableModel
+{
+ Q_OBJECT
+
+public:
+ explicit CaptureInfoModel(struct _capture_info *cap_info, QObject * parent = Q_NULLPTR);
+ virtual ~CaptureInfoModel() {}
+ void updateInfo();
+
+ virtual int rowCount(const QModelIndex &parent = QModelIndex()) const;
+ virtual int columnCount(const QModelIndex &parent = QModelIndex()) const;
+ virtual QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;
+// virtual QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const;
+
+private:
+ struct _capture_info *cap_info_;
+ int samples_;
+ QMap<int, int> last_count_;
+ QMap<int, QList<int> > points_;
+ int last_other_;
+ QList<int> other_points_;
+};
+
+class CaptureInfoDialog : public GeometryStateDialog
+{
+ Q_OBJECT
+
+public:
+ explicit CaptureInfoDialog(struct _capture_info *cap_info, struct _capture_session *cap_session, QWidget *parent = 0);
+ ~CaptureInfoDialog();
+ void updateInfo(void);
+
+signals:
+
+public slots:
+
+private slots:
+ void stopCapture();
+
+private:
+ Ui::CaptureInfoDialog *ui;
+ struct _capture_info *cap_info_;
+ struct _capture_session *cap_session_;
+ CaptureInfoModel *ci_model_;
+ QElapsedTimer duration_;
+};
+
+#endif // CAPTURE_INFO_DIALOG_H