1 /* address_editor_frame.h
2  *
3  * Wireshark - Network traffic analyzer
4  * By Gerald Combs <gerald@wireshark.org>
5  * Copyright 1998 Gerald Combs
6  *
7  * SPDX-License-Identifier: GPL-2.0-or-later
8  */
9 
10 #ifndef ADDRESS_EDITOR_FRAME_H
11 #define ADDRESS_EDITOR_FRAME_H
12 
13 #include "accordion_frame.h"
14 
15 #include "capture_file.h"
16 
17 namespace Ui {
18 class AddressEditorFrame;
19 }
20 
21 struct epan_column_info;
22 
23 class AddressEditorFrame : public AccordionFrame
24 {
25     Q_OBJECT
26 
27 public:
28     explicit AddressEditorFrame(QWidget *parent = 0);
29     ~AddressEditorFrame();
30 
31 public slots:
32     void editAddresses(CaptureFile &cf, int column = -1);
33 
34 signals:
35     void showNameResolutionPreferences(const QString module_name);
36     void redissectPackets();
37 
38 protected:
39     virtual void showEvent(QShowEvent *event);
40     virtual void keyPressEvent(QKeyEvent *event);
41 
42 private slots:
43     void displayPreviousUserDefinedHostname();
44     void updateWidgets();
45     void on_nameResolutionPreferencesToolButton_clicked();
46     void on_addressComboBox_currentIndexChanged(const QString &);
47     void on_nameLineEdit_textEdited(const QString &);
48     void on_buttonBox_accepted();
49     void on_buttonBox_rejected();
50 
51 private:
52     Ui::AddressEditorFrame *ui;
53     capture_file *cap_file_;
54 
55     bool isAddressColumn(struct epan_column_info *cinfo, int column);
56 };
57 
58 #endif // ADDRESS_EDITOR_FRAME_H
59