2012-01-04 22:13:01 +00:00
|
|
|
/* capture_info_dialog.h
|
|
|
|
*
|
|
|
|
* Wireshark - Network traffic analyzer
|
|
|
|
* By Gerald Combs <gerald@wireshark.org>
|
|
|
|
* Copyright 1998 Gerald Combs
|
|
|
|
*
|
2018-04-30 07:47:58 +00:00
|
|
|
* SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
*/
|
2012-01-04 22:13:01 +00:00
|
|
|
|
|
|
|
#ifndef CAPTURE_INFO_DIALOG_H
|
|
|
|
#define CAPTURE_INFO_DIALOG_H
|
|
|
|
|
2018-05-15 00:23:34 +00:00
|
|
|
#include "geometry_state_dialog.h"
|
2012-01-04 22:13:01 +00:00
|
|
|
|
2018-05-15 00:23:34 +00:00
|
|
|
#include <QAbstractTableModel>
|
2019-12-20 05:57:04 +00:00
|
|
|
#include <QElapsedTimer>
|
2018-05-15 00:23:34 +00:00
|
|
|
|
|
|
|
struct _capture_info;
|
|
|
|
struct _capture_session;
|
|
|
|
|
|
|
|
namespace Ui {
|
|
|
|
class CaptureInfoDialog;
|
|
|
|
}
|
|
|
|
|
|
|
|
class CaptureInfoModel : public QAbstractTableModel
|
2012-01-04 22:13:01 +00:00
|
|
|
{
|
|
|
|
Q_OBJECT
|
2018-05-15 00:23:34 +00:00
|
|
|
|
2012-01-04 22:13:01 +00:00
|
|
|
public:
|
2018-05-15 00:23:34 +00:00
|
|
|
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);
|
2012-01-04 22:13:01 +00:00
|
|
|
|
|
|
|
signals:
|
|
|
|
|
|
|
|
public slots:
|
|
|
|
|
2018-05-15 00:23:34 +00:00
|
|
|
private slots:
|
|
|
|
void stopCapture();
|
|
|
|
|
|
|
|
private:
|
|
|
|
Ui::CaptureInfoDialog *ui;
|
|
|
|
struct _capture_info *cap_info_;
|
|
|
|
struct _capture_session *cap_session_;
|
|
|
|
CaptureInfoModel *ci_model_;
|
2019-12-20 05:57:04 +00:00
|
|
|
QElapsedTimer duration_;
|
2012-01-04 22:13:01 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // CAPTURE_INFO_DIALOG_H
|