Wireshark 4.5.0
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
import_text_dialog.h
Go to the documentation of this file.
1
10#ifndef IMPORT_TEXT_DIALOG_H
11#define IMPORT_TEXT_DIALOG_H
12
13#include <config.h>
14
15#include <stdio.h>
16
17#include "ui/text_import.h"
18
20
21#include <QDialog>
22#include <QPushButton>
23#include <QRadioButton>
24#include <QButtonGroup>
25
26namespace Ui {
28}
29
30class ImportTextDialog : public QDialog
31{
32 Q_OBJECT
33
34public:
35 explicit ImportTextDialog(QWidget *parent = 0);
37 QString &capfileName();
38
39private:
40 void enableHeaderWidgets(uint encapsulation = WTAP_ENCAP_ETHERNET);
41
42 /* regex fields */
43 void enableFieldWidgets(bool enable_direction_input = true, bool enable_time_input = true);
44
45 void check_line_edit(SyntaxLineEdit *le, bool &ok_enable, const QString &num_str, int base, unsigned max_val, bool is_short, unsigned *val_ptr);
46 void checkAddress(SyntaxLineEdit *le, bool &ok_enable, const QString &addr_str, ws_in4_addr *val_ptr);
47 void checkIPv6Address(SyntaxLineEdit *le, bool &ok_enable, const QString &addr_str, ws_in6_addr *val_ptr);
48 bool checkDateTimeFormat(const QString &time_format);
49
50 void loadSettingsFile();
51 void saveSettingsFile();
52 void applyDialogSettings();
53 void storeDialogSettings();
54
55 void updateImportButtonState();
56
57 Ui::ImportTextDialog *ti_ui_;
58 QVariantMap settings;
59
60 QPushButton *import_button_;
61 QButtonGroup *encap_buttons;
62 text_import_info_t import_info_;
63 QString capfile_name_;
64 bool file_ok_;
65 bool timestamp_format_ok_;
66
67 /* Regex input */
68 bool regex_ok_;
69 bool re_has_dir_;
70 bool in_indication_ok_;
71 bool out_indication_ok_;
72 bool re_has_time_;
73
74 bool ether_type_ok_;
75 bool proto_ok_;
76 bool source_addr_ok_;
77 bool dest_addr_ok_;
78 bool source_port_ok_;
79 bool dest_port_ok_;
80 bool tag_ok_;
81 bool ppi_ok_;
82 bool payload_ok_;
83 bool max_len_ok_;
84
85public slots:
86 int exec();
87
88private slots:
89 void on_textFileBrowseButton_clicked();
90 void on_textFileLineEdit_textChanged(const QString &arg1);
91 void on_modeTabWidget_currentChanged(int index);
92 void on_timestampFormatLineEdit_textChanged(const QString &arg1);
93
94 /* Hex Dump input */
95 void on_noOffsetButton_toggled(bool checked);
96 void on_directionIndicationCheckBox_toggled(bool checked);
97 void on_asciiIdentificationCheckBox_toggled(bool checked);
98
99 /* Regex input */
100 void on_regexTextEdit_textChanged();
101 void on_dataEncodingComboBox_currentIndexChanged(int index);
102 void on_dirInIndicationLineEdit_textChanged(const QString &arg1);
103 void on_dirOutIndicationLineEdit_textChanged(const QString &arg1);
104
105 /* Encapsulation input */
106 void on_encapComboBox_currentIndexChanged(int index);
107 void encap_buttonsToggled(QAbstractButton *button, bool checked);
108 void on_ipVersionComboBox_currentIndexChanged(int index);
109 void on_ethertypeLineEdit_textChanged(const QString &ethertype_str);
110 void on_protocolLineEdit_textChanged(const QString &protocol_str);
111 void on_sourceAddressLineEdit_textChanged(const QString &source_addr_str);
112 void on_destinationAddressLineEdit_textChanged(const QString &destination_addr_str);
113 void on_sourcePortLineEdit_textChanged(const QString &source_port_str);
114 void on_destinationPortLineEdit_textChanged(const QString &destination_port_str);
115 void on_tagLineEdit_textChanged(const QString &tag_str);
116 void on_ppiLineEdit_textChanged(const QString &ppi_str);
117
118 /* Footer input */
119 void on_maxLengthLineEdit_textChanged(const QString &max_frame_len_str);
120 void on_buttonBox_helpRequested();
121};
122
123
124#endif // IMPORT_TEXT_DIALOG_H
Definition import_text_dialog.h:31
Definition syntax_line_edit.h:23
Definition inet_addr.h:21
Definition text_import.h:65