2012-09-17 23:40:53 +00:00
|
|
|
/* import_text_dialog.h
|
|
|
|
*
|
|
|
|
* 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
|
|
|
|
|
2012-09-20 02:03:38 +00:00
|
|
|
#include "config.h"
|
2012-09-17 23:40:53 +00:00
|
|
|
|
|
|
|
#include <stdio.h>
|
|
|
|
|
|
|
|
#include <glib.h>
|
|
|
|
|
|
|
|
#include "ui/text_import.h"
|
|
|
|
|
2013-08-29 22:15:40 +00:00
|
|
|
#include "syntax_line_edit.h"
|
2012-10-08 20:01:59 +00:00
|
|
|
|
2012-09-17 23:40:53 +00:00
|
|
|
#include <QDialog>
|
|
|
|
#include <QPushButton>
|
|
|
|
#include <QRadioButton>
|
|
|
|
|
|
|
|
namespace Ui {
|
|
|
|
class ImportTextDialog;
|
|
|
|
}
|
|
|
|
|
|
|
|
class ImportTextDialog : public QDialog
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
2014-02-25 20:42:35 +00:00
|
|
|
|
2012-09-17 23:40:53 +00:00
|
|
|
public:
|
|
|
|
explicit ImportTextDialog(QWidget *parent = 0);
|
|
|
|
~ImportTextDialog();
|
|
|
|
QString &capfileName();
|
2014-02-25 20:42:35 +00:00
|
|
|
|
2012-09-17 23:40:53 +00:00
|
|
|
private:
|
|
|
|
void convertTextFile();
|
|
|
|
void enableHeaderWidgets(bool enable_buttons = true);
|
2012-10-08 20:01:59 +00:00
|
|
|
void check_line_edit(SyntaxLineEdit *le, const QString &num_str, int base, guint max_val, bool is_short, guint *val_ptr);
|
2012-09-17 23:40:53 +00:00
|
|
|
|
2012-10-08 20:01:59 +00:00
|
|
|
Ui::ImportTextDialog *ti_ui_;
|
2012-09-17 23:40:53 +00:00
|
|
|
|
|
|
|
QPushButton *ok_button_;
|
|
|
|
QList<QRadioButton *>encap_buttons_;
|
|
|
|
text_import_info_t import_info_;
|
|
|
|
QString capfile_name_;
|
|
|
|
|
|
|
|
public slots:
|
2012-12-05 19:04:59 +00:00
|
|
|
int exec();
|
2012-09-17 23:40:53 +00:00
|
|
|
|
|
|
|
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);
|
2013-04-05 06:43:38 +00:00
|
|
|
void on_directionIndicationCheckBox_toggled(bool checked);
|
2012-09-17 23:40:53 +00:00
|
|
|
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 ðertype_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);
|
2012-09-18 00:17:04 +00:00
|
|
|
void on_buttonBox_helpRequested();
|
2012-09-17 23:40:53 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
#endif // IMPORT_TEXT_DIALOG_H
|
2012-09-25 19:29:04 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Editor modelines
|
|
|
|
*
|
|
|
|
* Local Variables:
|
|
|
|
* c-basic-offset: 4
|
|
|
|
* tab-width: 8
|
|
|
|
* indent-tabs-mode: nil
|
|
|
|
* End:
|
|
|
|
*
|
|
|
|
* ex: set shiftwidth=4 tabstop=8 expandtab:
|
|
|
|
* :indentSize=4:tabSize=8:noTabs=true:
|
|
|
|
*/
|