wireshark/ui/qt/packet_dialog.h
Guy Harris 1101efa898 Use pref_t rather than struct preference.
Consistently use it (except in some of the C++ code, where, for some
unknown reason, some headers, such as epan/prefs.h, are not being
included).

While we're at it, don't call prefs_find_module("extcap") twice, just
call it once and save the result.
2024-11-22 11:50:12 -08:00

68 lines
1.4 KiB
C++

/** @file
*
* Wireshark - Network traffic analyzer
* By Gerald Combs <gerald@wireshark.org>
* Copyright 1998 Gerald Combs
*
* SPDX-License-Identifier: GPL-2.0-or-later
*/
#ifndef PACKET_DIALOG_H
#define PACKET_DIALOG_H
#include "wireshark_dialog.h"
#include "epan/epan_dissect.h"
#include "wiretap/wtap.h"
#include "wsutil/buffer.h"
#include <ui/qt/utils/field_information.h>
class ByteViewTab;
class ProtoTree;
namespace Ui {
class PacketDialog;
}
class PacketDialog : public WiresharkDialog
{
Q_OBJECT
public:
explicit PacketDialog(QWidget &parent, CaptureFile &cf, frame_data *fdata);
~PacketDialog();
protected:
void captureFileClosing();
signals:
void showProtocolPreferences(const QString module_name);
void editProtocolPreference(pref_t *pref, struct pref_module *module);
private slots:
void on_buttonBox_helpRequested();
#if QT_VERSION >= QT_VERSION_CHECK(6, 7, 0)
void viewVisibilityStateChanged(Qt::CheckState);
#else
void viewVisibilityStateChanged(int);
#endif
void layoutChanged(int);
void setHintText(FieldInformation *);
void setHintTextSelected(FieldInformation*);
private:
Ui::PacketDialog *ui;
pref_t *pref_packet_dialog_layout_;
QString col_info_;
ProtoTree *proto_tree_;
ByteViewTab *byte_view_tab_;
wtap_rec rec_;
Buffer buf_;
epan_dissect_t edt_;
};
#endif // PACKET_DIALOG_H