aboutsummaryrefslogtreecommitdiffstats
path: root/ui/qt/import_text_dialog.h
blob: e0c7302e177b1bb57a6b54953bd636c9455a12b6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
/* import_text_dialog.h
 *
 * $Id: capture_file_dialog.cpp 44864 2012-09-10 23:03:22Z gerald $
 *
 * Wireshark - Network traffic analyzer
 * By Gerald Combs <gerald@wireshark.org>
 * Copyright 1998 Gerald Combs
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2
 * of the License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 */

#ifndef IMPORT_TEXT_DIALOG_H
#define IMPORT_TEXT_DIALOG_H

#ifdef HAVE_CONFIG_H
# include "config.h"
#endif

#include <stdio.h>

#include <glib.h>

#include "ui/text_import.h"

#include <QDialog>
#include <QPushButton>
#include <QRadioButton>

namespace Ui {
class ImportTextDialog;
}

class ImportTextDialog : public QDialog
{
    Q_OBJECT
    
public:
    explicit ImportTextDialog(QWidget *parent = 0);
    ~ImportTextDialog();
    QString &capfileName();
    
private:
    void convertTextFile();
    void enableHeaderWidgets(bool enable_buttons = true);

    Ui::ImportTextDialog *ui;

    QPushButton *ok_button_;
    QList<QRadioButton *>encap_buttons_;
    text_import_info_t import_info_;
    QString capfile_name_;

public slots:
    void exec();

private slots:
    void on_textFileBrowseButton_clicked();
    void on_textFileLineEdit_textChanged(const QString &arg1);
    void on_encapComboBox_currentIndexChanged(int index);
    void on_dateTimeLineEdit_textChanged(const QString &arg1);
    void on_noDummyButton_toggled(bool checked);
    void on_ethernetButton_toggled(bool checked);
    void on_ipv4Button_toggled(bool checked);
    void on_udpButton_toggled(bool checked);
    void on_tcpButton_toggled(bool checked);
    void on_sctpButton_toggled(bool checked);
    void on_sctpDataButton_toggled(bool checked);
    void on_ethertypeLineEdit_textChanged(const QString &ethertype_str);
    void on_protocolLineEdit_textChanged(const QString &protocol_str);
    void on_sourcePortLineEdit_textChanged(const QString &source_port_str);
    void on_destinationPortLineEdit_textChanged(const QString &destination_port_str);
    void on_tagLineEdit_textChanged(const QString &tag_str);
    void on_ppiLineEdit_textChanged(const QString &ppi_str);
    void on_maxLengthLineEdit_textChanged(const QString &max_frame_len_str);
    void on_buttonBox_helpRequested();
};


#endif // IMPORT_TEXT_DIALOG_H