diff --git a/doc/README.qt b/doc/README.qt index d3dac582dd..754a8ea60d 100644 --- a/doc/README.qt +++ b/doc/README.qt @@ -177,13 +177,22 @@ porting a feature, consider the following: 2.1.1 Name conventions Most of the code in the ui/qt directory uses three APIs: Qt (which uses -InterCapConvention), GLib (which uses underscore_convention), and the Wireshark -API (which also uses underscore_convention). As a general rule Wireshark's Qt -code uses InterCapConvention for class names and methods and -underscore_convention for variables, with a trailing underscore for member -variables. +InterCapConvention), GLib (which uses underscore_convention), and the +Wireshark API (which also uses underscore_convention). As a general rule +Wireshark's Qt code uses InterCapConvention for class names, +interCapConvention for methods, and underscore_convention for variables, +with a trailing underscore for member variables. -2.1.2 Strings +2.1.2 Class layout + +Dialogs that work with capture file information shouldn't close just +because the capture file closes. I.e. they should receive the +setCaptureFile signal and react accordingly. + +In most cases you should handle the changeEvent in order to catch +QEvent::LanguageChange. + +2.1.3 Strings If you're using GLib string functions or plain old C character array idioms in Qt-only code you're probably doing something wrong. QStrings are generally @@ -192,7 +201,7 @@ Qt-only code you're probably doing something wrong. QStrings are generally If you need to pass strings between Qt and GLib you can use qstring_strdup gchar_free_to_qstring, which are defined in ui/qt/qt_ui_utils.h. -2.1.3 Mixing C and C++ +2.1.4 Mixing C and C++ Sometimes we have to call C++ functions from one of Wireshark's C callbacks and pass C++ objects to or from C. The C++ FAQ describes how to do this safely: @@ -245,4 +254,4 @@ http://qt-project.org/doc/qt-4.8/linguist-manual.html it is (re)created then it is ok to have tr() in code - For creating submenu in context menu please follow solution from ui/qt/proto_tree.cpp - Some new windows need also to override changeEvent() and do retranslateUi() like - summary_dialog.[ch] does \ No newline at end of file + summary_dialog.[ch] does diff --git a/docbook/release-notes.asciidoc b/docbook/release-notes.asciidoc index 0d65abd695..0afa8f5e24 100644 --- a/docbook/release-notes.asciidoc +++ b/docbook/release-notes.asciidoc @@ -33,6 +33,7 @@ reassembled packets. ** Hovering over a byte-view field causes the field to be highlighted and a description to be shown in the status bar. ** An Italian translation has been added. +** The Summary dialog has been updated and renamed to Capture File Properties. The following features are new (or have been significantly updated) since version 1.12.0: diff --git a/image/status.qrc b/image/status.qrc index 5d9fb3db4e..041780d48c 100644 --- a/image/status.qrc +++ b/image/status.qrc @@ -7,4 +7,7 @@ expert_warn.png expert_ok.png + + capture_comment_update.png + diff --git a/ui/qt/CMakeLists.txt b/ui/qt/CMakeLists.txt index dc01df4f08..dcd553c261 100644 --- a/ui/qt/CMakeLists.txt +++ b/ui/qt/CMakeLists.txt @@ -27,6 +27,7 @@ set(WIRESHARK_QT_HEADERS byte_view_tab.h byte_view_text.h capture_file_dialog.h + capture_file_properties_dialog.h capture_filter_combo.h capture_filter_edit.h capture_filter_syntax_worker.h @@ -91,7 +92,6 @@ set(WIRESHARK_QT_HEADERS simple_dialog.h splash_overlay.h stats_tree_dialog.h - summary_dialog.h syntax_line_edit.h tcp_stream_dialog.h time_shift_dialog.h @@ -122,6 +122,7 @@ set(WIRESHARK_QT_SRC byte_view_tab.cpp byte_view_text.cpp capture_file_dialog.cpp + capture_file_properties_dialog.cpp capture_filter_combo.cpp capture_filter_edit.cpp capture_filter_syntax_worker.cpp @@ -188,7 +189,6 @@ set(WIRESHARK_QT_SRC splash_overlay.cpp sparkline_delegate.cpp stock_icon.cpp - summary_dialog.cpp syntax_line_edit.cpp tcp_stream_dialog.cpp time_shift_dialog.cpp @@ -223,8 +223,9 @@ set(DIRTY_FILES set(WIRESHARK_QT_UI about_dialog.ui - capture_preferences_frame.ui + capture_file_properties_dialog.ui capture_interfaces_dialog.ui + capture_preferences_frame.ui column_preferences_frame.ui compiled_filter_output.ui decode_as_dialog.ui @@ -262,7 +263,6 @@ set(WIRESHARK_QT_UI sequence_dialog.ui splash_overlay.ui stats_tree_dialog.ui - summary_dialog.ui tcp_stream_dialog.ui time_shift_dialog.ui traffic_table_dialog.ui diff --git a/ui/qt/Makefile.am b/ui/qt/Makefile.am index 328e75d919..c8d7b447bb 100644 --- a/ui/qt/Makefile.am +++ b/ui/qt/Makefile.am @@ -122,6 +122,8 @@ ui_%.h: %.ui about_dialog.cpp about_dialog.h: ui_about_dialog.h +capture_file_properties_dialog.cpp capture_file_properties_dialog.h: ui_capture_file_properties_dialog.h + capture_interfaces_dialog.cpp capture_interfaces_dialog.h: ui_capture_interfaces_dialog.h capture_preferences_frame.cpp capture_preferences_frame.h: ui_capture_preferences_frame.h @@ -204,8 +206,6 @@ splash_overlay.cpp splash_overlay.h: ui_splash_overlay.h stats_tree_dialog.cpp stats_tree_dialog.h: ui_stats_tree_dialog.h -summary_dialog.cpp summary_dialog.h: ui_summary_dialog.h - tcp_stream_dialog.cpp: ui_tcp_stream_dialog.h time_shift_dialog.cpp time_shift_dialog.h: ui_time_shift_dialog.h diff --git a/ui/qt/Makefile.common b/ui/qt/Makefile.common index 58be18c162..251a8f62cf 100644 --- a/ui/qt/Makefile.common +++ b/ui/qt/Makefile.common @@ -30,6 +30,7 @@ GENERATED_HEADER_FILES = # Generated header files that we don't want in the distribution. NODIST_GENERATED_HEADER_FILES = \ ui_about_dialog.h \ + ui_capture_file_properties_dialog.h \ ui_capture_interfaces_dialog.h \ ui_capture_preferences_frame.h \ ui_column_preferences_frame.h \ @@ -71,7 +72,6 @@ NODIST_GENERATED_HEADER_FILES = \ ui_search_frame.h \ ui_sequence_dialog.h \ ui_splash_overlay.h \ - ui_summary_dialog.h \ ui_tcp_stream_dialog.h \ ui_time_shift_dialog.h \ ui_traffic_table_dialog.h \ @@ -116,6 +116,7 @@ MOC_HDRS = \ byte_view_tab.h \ byte_view_text.h \ capture_file_dialog.h \ + capture_file_properties_dialog.h \ capture_filter_combo.h \ capture_filter_edit.h \ capture_filter_syntax_worker.h \ @@ -184,7 +185,6 @@ MOC_HDRS = \ sparkline_delegate.h \ splash_overlay.h \ stats_tree_dialog.h \ - summary_dialog.h \ syntax_line_edit.h \ tcp_stream_dialog.h \ time_shift_dialog.h \ @@ -198,6 +198,7 @@ MOC_HDRS = \ # UI_FILES = \ about_dialog.ui \ + capture_file_properties_dialog.ui \ capture_interfaces_dialog.ui \ capture_preferences_frame.ui \ column_preferences_frame.ui \ @@ -239,7 +240,6 @@ UI_FILES = \ sequence_dialog.ui \ splash_overlay.ui \ stats_tree_dialog.ui \ - summary_dialog.ui \ tcp_stream_dialog.ui \ time_shift_dialog.ui \ traffic_table_dialog.ui \ @@ -307,6 +307,7 @@ WIRESHARK_QT_SRC = \ byte_view_tab.cpp \ byte_view_text.cpp \ capture_file_dialog.cpp \ + capture_file_properties_dialog.cpp \ capture_filter_combo.cpp \ capture_filter_edit.cpp \ capture_filter_syntax_worker.cpp \ @@ -380,7 +381,6 @@ WIRESHARK_QT_SRC = \ splash_overlay.cpp \ stats_tree_dialog.cpp \ stock_icon.cpp \ - summary_dialog.cpp \ syntax_line_edit.cpp \ tcp_stream_dialog.cpp \ time_shift_dialog.cpp \ diff --git a/ui/qt/Wireshark.pro b/ui/qt/Wireshark.pro index 4c3e4db3a8..5d42d5b358 100644 --- a/ui/qt/Wireshark.pro +++ b/ui/qt/Wireshark.pro @@ -207,8 +207,9 @@ HEADERS_WS_C = \ FORMS += \ about_dialog.ui \ - capture_preferences_frame.ui \ + capture_file_properties_dialog.ui \ capture_interfaces_dialog.ui \ + capture_preferences_frame.ui \ column_preferences_frame.ui \ compiled_filter_output.ui \ decode_as_dialog.ui \ @@ -248,7 +249,6 @@ FORMS += \ sequence_dialog.ui \ splash_overlay.ui \ stats_tree_dialog.ui \ - summary_dialog.ui \ tcp_stream_dialog.ui \ time_shift_dialog.ui \ traffic_table_dialog.ui \ @@ -258,6 +258,7 @@ FORMS += \ HEADERS += $$HEADERS_WS_C \ about_dialog.h \ accordion_frame.h \ + capture_file_properties_dialog.h \ capture_interfaces_dialog.h \ capture_preferences_frame.h \ column_preferences_frame.h \ @@ -298,7 +299,6 @@ HEADERS += $$HEADERS_WS_C \ search_frame.h \ splash_overlay.h \ stats_tree_dialog.h \ - summary_dialog.h \ tango_colors.h \ tcp_stream_dialog.h \ traffic_table_dialog.h \ @@ -588,6 +588,7 @@ SOURCES += \ byte_view_tab.cpp \ byte_view_text.cpp \ capture_file_dialog.cpp \ + capture_file_properties_dialog.cpp \ capture_filter_combo.cpp \ capture_filter_edit.cpp \ capture_filter_syntax_worker.cpp \ @@ -661,7 +662,6 @@ SOURCES += \ splash_overlay.cpp \ stats_tree_dialog.cpp \ stock_icon.cpp \ - summary_dialog.cpp \ syntax_line_edit.cpp \ tcp_stream_dialog.cpp \ time_shift_dialog.cpp \ diff --git a/ui/qt/capture_file_properties_dialog.cpp b/ui/qt/capture_file_properties_dialog.cpp new file mode 100644 index 0000000000..47673ad548 --- /dev/null +++ b/ui/qt/capture_file_properties_dialog.cpp @@ -0,0 +1,551 @@ +/* capture_file_properties_dialog.cpp + * + * GSoC 2013 - QtShark + * + * Wireshark - Network traffic analyzer + * By Gerald Combs + * 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. + */ + +#include "capture_file_properties_dialog.h" +#include "ui_capture_file_properties_dialog.h" + +#include "summary.h" + +#include "wsutil/str_util.h" +#include "wsutil/ws_version_info.h" + +#include "wireshark_application.h" + +#include +#include +#include + +// To do: +// - Add file hashes +// - Add formats (HTML, plain text, YAML)? + +CaptureFilePropertiesDialog::CaptureFilePropertiesDialog(QWidget *parent, capture_file *cf) : + QDialog(parent), + ui(new Ui::SummaryDialog), + cap_file_(cf) +{ + ui->setupUi(this); + + // XXX Use recent settings instead + if (parent) { + resize(parent->width() * 2 / 3, parent->height()); + } + + QPushButton *button = ui->buttonBox->button(QDialogButtonBox::Reset); + if (button) { + button->setText(tr("Refresh")); + } + + button = ui->buttonBox->button(QDialogButtonBox::Apply); + if (button) { + button->setText(tr("Copy To Clipboard")); + } + + button = ui->buttonBox->button(QDialogButtonBox::Save); + if (button) { + button->setText(tr("Save Comments")); + } + + updateWidgets(); +} + +/* + * Slots + */ + +CaptureFilePropertiesDialog::~CaptureFilePropertiesDialog() +{ + delete ui; +} + +/**/ + +void CaptureFilePropertiesDialog::setCaptureFile(capture_file *cf) +{ + if (!cf) { // We only want to know when the file closes. + cap_file_ = NULL; + } + updateWidgets(); +} + +void CaptureFilePropertiesDialog::updateWidgets() +{ + QPushButton *save_bt = ui->buttonBox->button(QDialogButtonBox::Save); + if (!cap_file_) { + refresh_button_->setEnabled(false); + ui->commentsTextEdit->setReadOnly(true); + save_bt->setEnabled(false); + return; + } + + bool enable = wtap_dump_can_write(cap_file_->linktypes, WTAP_COMMENT_PER_SECTION); + save_bt->setEnabled(enable); + ui->commentsTextEdit->setEnabled(enable); + + ui->detailsTextEdit->setHtml(summaryToHtml()); + ui->commentsTextEdit->setText(cf_read_shb_comment(cap_file_)); +} + +QString CaptureFilePropertiesDialog::timeToString(time_t ti_time) +{ + QDateTime date_time = QDateTime::fromTime_t(ti_time); + QString time_str = date_time.toLocalTime().toString("yyyy-MM-dd hh:mm:ss"); + return time_str; +} + +QString CaptureFilePropertiesDialog::summaryToHtml() +{ + summary_tally summary; + double seconds = 0.0; + double disp_seconds = 0.0; + double marked_seconds = 0.0; + + memset(&summary, 0, sizeof(summary_tally)); + + QString section_tmpl; + QString table_begin, table_end; + QString table_row_begin, table_ul_row_begin, table_row_end; + QString table_vheader_tmpl, table_hheader20_tmpl, table_hheader25_tmpl; + QString table_data_tmpl; + + section_tmpl = "

%1

\n"; + table_begin = "

\n"; + table_end = "

\n"; + table_row_begin = "\n"; + table_ul_row_begin = "\n"; + table_row_end = "\n"; + table_vheader_tmpl = "%1:"; // looked odd + table_hheader20_tmpl = "%1"; + table_hheader25_tmpl = "%1"; + table_data_tmpl = "%1"; + + if (cap_file_) { + /* initial computations */ + summary_fill_in(cap_file_, &summary); +#ifdef HAVE_LIBPCAP + summary_fill_in_capture(cap_file_, &global_capture_opts, &summary); +#endif + } + + seconds = summary.stop_time - summary.start_time; + disp_seconds = summary.filtered_stop - summary.filtered_start; + marked_seconds = summary.marked_stop - summary.marked_start; + + QString summary_str; + QTextStream out(&summary_str); + QString unknown = tr("Unknown"); + + // File Section + out << section_tmpl.arg(tr("File")); + out << table_begin; + + out << table_row_begin + << table_vheader_tmpl.arg(tr("Name")) + << table_data_tmpl.arg(summary.filename) + << table_row_end; + + out << table_row_begin + << table_vheader_tmpl.arg(tr("Length")) + << table_data_tmpl.arg(gchar_free_to_qstring(format_size(summary.file_length, format_size_unit_bytes))) + << table_row_end; + + QString format_str = wtap_file_type_subtype_string(summary.file_type); + if (summary.iscompressed) { + format_str.append(tr(" (gzip compressed)")); + } + out << table_row_begin + << table_vheader_tmpl.arg(tr("Format")) + << table_data_tmpl.arg(format_str) + << table_row_end; + + QString encaps_str; + if (summary.file_encap_type == WTAP_ENCAP_PER_PACKET) { + for (guint i = 0; i < summary.packet_encap_types->len; i++) + { + encaps_str = QString(wtap_encap_string(g_array_index(summary.packet_encap_types, int, i))); + } + } else { + encaps_str = QString(wtap_encap_string(summary.file_encap_type)); + } + out << table_row_begin + << table_vheader_tmpl.arg(tr("Encapsulation")) + << table_data_tmpl.arg(encaps_str) + << table_row_end; + + out << table_end; + + // Time Section + if (summary.packet_count_ts == summary.packet_count && + summary.packet_count >= 1) + { + out << section_tmpl.arg(tr("Time")); + out << table_begin; + + // start time + out << table_row_begin + << table_vheader_tmpl.arg(tr("First packet")) + << table_data_tmpl.arg(timeToString((time_t)summary.start_time)) + << table_row_end; + + // stop time + out << table_row_begin + << table_vheader_tmpl.arg(tr("Last packet")) + << table_data_tmpl.arg(timeToString((time_t)summary.stop_time)) + << table_row_end; + + // elapsed seconds (capture duration) + if (summary.packet_count_ts >= 2) + { + /* elapsed seconds */ + QString elapsed_str; + unsigned int elapsed_time = (unsigned int)summary.elapsed_time; + if (elapsed_time/86400) + { + elapsed_str = QString("%1 days ").arg(elapsed_time / 86400); + } + + elapsed_str += QString("%1:%2:%3") + .arg(elapsed_time % 86400 / 3600, 2, 10, QChar('0')) + .arg(elapsed_time % 3600 / 60, 2, 10, QChar('0')) + .arg(elapsed_time % 60, 2, 10, QChar('0')); + out << table_row_begin + << table_vheader_tmpl.arg(tr("Elapsed")) + << table_data_tmpl.arg(elapsed_str) + << table_row_end; + } + + out << table_end; + } + + // Capture Section + out << section_tmpl.arg(tr("Capture")); + out << table_begin; + + QString capture_hardware(unknown); + if (summary.shb_hardware && summary.shb_hardware[0] != '\0') { + capture_hardware = summary.shb_hardware; + } + // capture HW + out << table_row_begin + << table_vheader_tmpl.arg(tr("Hardware")) + << table_data_tmpl.arg(capture_hardware) + << table_row_end; + + QString capture_os(unknown); + if (summary.shb_os && summary.shb_os[0] != '\0') { + capture_os = summary.shb_os; + } + out << table_row_begin + << table_vheader_tmpl.arg(tr("OS")) + << table_data_tmpl.arg(capture_os) + << table_row_end; + + QString capture_app(unknown); + if (summary.shb_user_appl && summary.shb_user_appl[0] != '\0') { + capture_app = summary.shb_user_appl; + } + out << table_row_begin + << table_vheader_tmpl.arg(tr("Application")) + << table_data_tmpl.arg(capture_app) + << table_row_end; + + out << table_end; + + // capture interfaces info + if (summary.ifaces->len > 0) { + out << section_tmpl.arg(tr("Interfaces")); + out << table_begin; + + out << table_ul_row_begin + << table_hheader20_tmpl.arg(tr("Interface")) + << table_hheader20_tmpl.arg(tr("Dropped packets")) + << table_hheader20_tmpl.arg(tr("Capture filter")) + << table_hheader20_tmpl.arg(tr("Link type")) + << table_hheader20_tmpl.arg(tr("Packet size limit")) + << table_row_end; + } + + for (guint i = 0; i < summary.ifaces->len; i++) { + iface_options iface; + iface = g_array_index(summary.ifaces, iface_options, i); + + /* interface */ + QString interface_name(unknown); + if (iface.descr) { + interface_name = iface.descr; + } else if (iface.name) + { + interface_name = iface.name; + } + + /* Dropped count */ + QString interface_drops(unknown); + if (iface.drops_known) { + interface_drops = QString("%1 (%2 %)").arg(iface.drops).arg(QString::number( + /* MSVC cannot convert from unsigned __int64 to float, so first convert to signed __int64 */ + summary.packet_count ?(100.0 * (gint64)iface.drops)/summary.packet_count : 0.0f, 'g', 1)); + } + + /* Capture filter */ + QString interface_cfilter(unknown); + if (iface.cfilter && iface.cfilter[0] != '\0') { + interface_cfilter = iface.cfilter; + } else if (iface.name) { + interface_cfilter = QString(tr("none")); + } + + QString interface_snaplen = QString(tr("%1 bytes").arg(iface.snap)); + + out << table_row_begin + << table_data_tmpl.arg(interface_name) + << table_data_tmpl.arg(interface_drops) + << table_data_tmpl.arg(interface_cfilter) + << table_data_tmpl.arg(wtap_encap_string(iface.encap_type)) + << table_data_tmpl.arg(interface_snaplen) + << table_row_end; + + } + if (summary.ifaces->len > 0) { + out << table_end; + } + + // Statistics Section + out << section_tmpl.arg(tr("Statistics")); + out << table_begin; + + out << table_ul_row_begin + << table_hheader25_tmpl.arg(tr("Measurement")) + << table_hheader25_tmpl.arg(tr("Captured")) + << table_hheader25_tmpl.arg(tr("Displayed")) + << table_hheader25_tmpl.arg(tr("Marked")) + << table_row_end; + + // TRANSLATOR Abbreviation for "not applicable" + QString n_a = tr("N/A"); + QString captured_str, displayed_str, marked_str; + + // Packets + displayed_str = marked_str = n_a; + if (summary.filtered_count > 0 && summary.packet_count > 0) { + displayed_str = QString("%1 (%2%)") + .arg(summary.filtered_count) + .arg(100.0 * summary.filtered_count / summary.packet_count, 1, 'f', 1); + } + if (summary.packet_count > 0 && summary.marked_count > 0) { + marked_str = QString("%1 (%2%)") + .arg(summary.marked_count) + .arg(100.0 * summary.marked_count / summary.packet_count, 1, 'f', 1); + } + + out << table_row_begin + << table_data_tmpl.arg(tr("Packets")) + << table_data_tmpl.arg(summary.packet_count) + << table_data_tmpl.arg(displayed_str) + << table_data_tmpl.arg(marked_str) + << table_row_end; + + // Time between first and last + captured_str = displayed_str = marked_str = n_a; + if (seconds > 0) { + captured_str = QString("%1").arg(seconds, 1, 'f', 3); + } + if (disp_seconds > 0) { + displayed_str = QString("%1").arg(disp_seconds, 1, 'f', 3); + } + if (marked_seconds > 0) { + marked_str = QString("%1").arg(marked_seconds, 1, 'f', 3); + } + out << table_row_begin + << table_data_tmpl.arg(tr("Time span, s")) + << table_data_tmpl.arg(captured_str) + << table_data_tmpl.arg(displayed_str) + << table_data_tmpl.arg(marked_str) + << table_row_end; + + // Average packets per second + captured_str = displayed_str = marked_str = n_a; + if (seconds > 0) { + captured_str = QString("%1").arg(summary.packet_count/seconds, 1, 'f', 1); + } + if (disp_seconds > 0) { + displayed_str = QString("%1").arg(summary.filtered_count/disp_seconds, 1, 'f', 1); + } + if (marked_seconds > 0) { + marked_str = QString("%1").arg(summary.marked_count/marked_seconds, 1, 'f', 1); + } + out << table_row_begin + << table_data_tmpl.arg(tr("Average pps")) + << table_data_tmpl.arg(captured_str) + << table_data_tmpl.arg(displayed_str) + << table_data_tmpl.arg(marked_str) + << table_row_end; + + // Average packets per second + captured_str = displayed_str = marked_str = n_a; + if (summary.packet_count > 0) { + captured_str = QString("%1").arg(summary.bytes/summary.packet_count + 0.5, 1, 'f', 1); + } + if (summary.filtered_count > 0) { + displayed_str = QString("%1").arg(summary.filtered_bytes/summary.filtered_count + 0.5, 1, 'f', 1); + } + if (summary.marked_count > 0) { + marked_str = QString("%1").arg(summary.marked_bytes/summary.marked_count + 0.5, 1, 'f', 1); + } + out << table_row_begin + << table_data_tmpl.arg(tr("Average packet size, B")) + << table_data_tmpl.arg(captured_str) + << table_data_tmpl.arg(displayed_str) + << table_data_tmpl.arg(marked_str) + << table_row_end; + + // Byte count + displayed_str = marked_str = "0"; + if (summary.bytes > 0 && summary.filtered_bytes > 0) { + displayed_str = QString("%1 (%2%)") + .arg(summary.filtered_bytes) + .arg(100.0 * summary.filtered_bytes / summary.bytes, 1, 'f', 1); + } + if (summary.bytes > 0 && summary.marked_bytes > 0) { + marked_str = QString("%1 (%2%)") + .arg(summary.marked_bytes) + .arg(100.0 * summary.marked_bytes / summary.bytes, 1, 'f', 1); + } + out << table_row_begin + << table_data_tmpl.arg(tr("Bytes")) + << table_data_tmpl.arg(summary.bytes) + << table_data_tmpl.arg(displayed_str) + << table_data_tmpl.arg(marked_str) + << table_row_end; + + // Bytes per second + captured_str = displayed_str = marked_str = n_a; + if (seconds > 0) { + captured_str = + gchar_free_to_qstring(format_size(summary.bytes / seconds, format_size_unit_none|format_size_prefix_si)); + } + if (disp_seconds > 0) { + displayed_str = + gchar_free_to_qstring(format_size(summary.filtered_bytes / disp_seconds, format_size_unit_none|format_size_prefix_si)); + } + if (marked_seconds > 0) { + marked_str = + gchar_free_to_qstring(format_size(summary.marked_bytes / marked_seconds, format_size_unit_none|format_size_prefix_si)); + } + out << table_row_begin + << table_data_tmpl.arg(tr("Average bytes/s")) + << table_data_tmpl.arg(captured_str) + << table_data_tmpl.arg(displayed_str) + << table_data_tmpl.arg(marked_str) + << table_row_end; + + // Bits per second + captured_str = displayed_str = marked_str = n_a; + if (seconds > 0) { + captured_str = + gchar_free_to_qstring(format_size(summary.bytes * 8 / seconds, format_size_unit_none|format_size_prefix_si)); + } + if (disp_seconds > 0) { + displayed_str = + gchar_free_to_qstring(format_size(summary.filtered_bytes * 8 / disp_seconds, format_size_unit_none|format_size_prefix_si)); + } + if (marked_seconds > 0) { + marked_str = + gchar_free_to_qstring(format_size(summary.marked_bytes * 8 / marked_seconds, format_size_unit_none|format_size_prefix_si)); + } + out << table_row_begin + << table_data_tmpl.arg(tr("Average bits/s")) + << table_data_tmpl.arg(captured_str) + << table_data_tmpl.arg(displayed_str) + << table_data_tmpl.arg(marked_str) + << table_row_end; + + out << table_end; + + return summary_str; +} + +void CaptureFilePropertiesDialog::changeEvent(QEvent* event) +{ + if (0 != event) + { + switch (event->type()) + { + case QEvent::LanguageChange: + ui->retranslateUi(this); + updateWidgets(); + break; + default: + break; + } + } + QDialog::changeEvent(event); +} + +void CaptureFilePropertiesDialog::on_buttonBox_helpRequested() +{ + wsApp->helpTopicAction(HELP_STATS_SUMMARY_DIALOG); +} + +void CaptureFilePropertiesDialog::on_buttonBox_accepted() +{ + if (!cap_file_ || !cap_file_->filename) { + return; + } + + if (wtap_dump_can_write(cap_file_->linktypes, WTAP_COMMENT_PER_SECTION)) + { + gchar *str = qstring_strdup(ui->commentsTextEdit->toPlainText()); + cf_update_capture_comment(cap_file_, str); + emit captureCommentChanged(); + } +} + +void CaptureFilePropertiesDialog::on_buttonBox_clicked(QAbstractButton *button) +{ + if (button == ui->buttonBox->button(QDialogButtonBox::Apply)) { + QClipboard *clipboard = QApplication::clipboard(); + QString details = tr("Created by Wireshark %1\n\n").arg(get_ws_vcs_version_info()); + details.append(ui->detailsTextEdit->toPlainText()); + clipboard->setText(details); + } else if (button == ui->buttonBox->button(QDialogButtonBox::Reset)) { + updateWidgets(); + } +} + +void CaptureFilePropertiesDialog::on_buttonBox_rejected() +{ + reject(); +} + +/* + * 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: + */ diff --git a/ui/qt/summary_dialog.h b/ui/qt/capture_file_properties_dialog.h similarity index 66% rename from ui/qt/summary_dialog.h rename to ui/qt/capture_file_properties_dialog.h index 5d13990d1a..c4df9f1316 100644 --- a/ui/qt/summary_dialog.h +++ b/ui/qt/capture_file_properties_dialog.h @@ -1,4 +1,4 @@ -/* summary_dialog.h +/* capture_file_properties_dialog.h * * GSoC 2013 - QtShark * @@ -21,8 +21,8 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -#ifndef SUMMARY_DIALOG_H -#define SUMMARY_DIALOG_H +#ifndef CAPTURE_FILE_PROPERTIES_DIALOG_H +#define CAPTURE_FILE_PROPERTIES_DIALOG_H #include "config.h" @@ -34,55 +34,56 @@ #include #include -#include "globals.h" #include "file.h" -#include "summary.h" #ifdef HAVE_LIBPCAP #include "ui/capture.h" #include "ui/capture_globals.h" #endif -#include #include +#include namespace Ui { class SummaryDialog; } -class SummaryDialog : public QDialog +class QAbstractButton; + +class CaptureFilePropertiesDialog : public QDialog { Q_OBJECT public: - explicit SummaryDialog(QWidget *parent = 0); - ~SummaryDialog(); + explicit CaptureFilePropertiesDialog(QWidget *parent = 0, capture_file *cf = NULL); + ~CaptureFilePropertiesDialog(); - - QString TimeToString(time_t ti_time); - void UpdateValues(); - QString SummaryToString(); +public slots: + void setCaptureFile(capture_file *cf); signals: void captureCommentChanged(); - protected slots: - void RefreshData(); - void SaveComment(); - void HelpButton(); - void CopyComment(); - void on_tabWidget_currentChanged(int index); void changeEvent(QEvent* event); private: - Ui::SummaryDialog *ui; + Ui::SummaryDialog *ui; + capture_file *cap_file_; - QPushButton *bRefresh; - QPushButton *bCopyComment; + QPushButton *refresh_button_; + QPushButton *copy_comment_button_; - summary_tally summary_; + QString timeToString(time_t ti_time); + QString summaryToHtml(); + +private slots: + void updateWidgets(); + void on_buttonBox_helpRequested(); + void on_buttonBox_accepted(); + void on_buttonBox_clicked(QAbstractButton *button); + void on_buttonBox_rejected(); }; #endif diff --git a/ui/qt/capture_file_properties_dialog.ui b/ui/qt/capture_file_properties_dialog.ui new file mode 100644 index 0000000000..5c233603ec --- /dev/null +++ b/ui/qt/capture_file_properties_dialog.ui @@ -0,0 +1,74 @@ + + + SummaryDialog + + + + 0 + 0 + 799 + 585 + + + + + 0 + 0 + + + + Wireshark - Capture File Properties + + + + :/menu/help/wsicon16.png:/menu/help/wsicon16.png + + + + + + + + + Details + + + + + + + true + + + + + + + Capture file comments + + + + + + + + 0 + 10 + + + + + + + + QDialogButtonBox::Apply|QDialogButtonBox::Close|QDialogButtonBox::Help|QDialogButtonBox::Reset|QDialogButtonBox::Save + + + + + + + + + + diff --git a/ui/qt/follow_stream_dialog.cpp b/ui/qt/follow_stream_dialog.cpp index 0d408ad3d7..ea80c8980c 100644 --- a/ui/qt/follow_stream_dialog.cpp +++ b/ui/qt/follow_stream_dialog.cpp @@ -49,6 +49,7 @@ #include "ui/follow.h" +#include "qt_ui_utils.h" #include "wireshark_application.h" #include diff --git a/ui/qt/main_status_bar.cpp b/ui/qt/main_status_bar.cpp index 098e305991..a0c016b7bd 100644 --- a/ui/qt/main_status_bar.cpp +++ b/ui/qt/main_status_bar.cpp @@ -118,13 +118,18 @@ MainStatusBar::MainStatusBar(QWidget *parent) : expert_status_.setTextFormat(Qt::RichText); expert_status_.hide(); - // XXX Add the comment icon + // We just want a clickable image. Using a QPushButton or QToolButton would require + // a lot of adjustment. + comment_label_.setText(""); + comment_label_.setToolTip(tr("Open the Capture Properties dialgo")); + connect(&comment_label_, SIGNAL(linkActivated(QString)), this, SIGNAL(editCaptureComment())); info_progress_hb->setContentsMargins(0, 0, 0, 0); info_status_.setTemporaryContext(STATUS_CTX_TEMPORARY); info_progress_hb->addWidget(&expert_status_); + info_progress_hb->addWidget(&comment_label_); info_progress_hb->addWidget(&info_status_); info_progress_hb->addWidget(&progress_bar_); info_progress_hb->addStretch(10); @@ -221,6 +226,7 @@ void MainStatusBar::expertUpdate() { void MainStatusBar::setCaptureFile(capture_file *cf) { cap_file_ = cf; + comment_label_.setEnabled(cap_file_ != NULL); } void MainStatusBar::pushTemporaryStatus(QString &message) { diff --git a/ui/qt/main_status_bar.h b/ui/qt/main_status_bar.h index fdcf5d02c3..da2d4fe903 100644 --- a/ui/qt/main_status_bar.h +++ b/ui/qt/main_status_bar.h @@ -26,9 +26,9 @@ #include "label_stack.h" #include "progress_bar.h" -#include #include #include +#include #include "cfile.h" @@ -43,6 +43,7 @@ public: private: QLabel expert_status_; + QLabel comment_label_; LabelStack info_status_; ProgressBar progress_bar_; LabelStack packet_status_; @@ -54,6 +55,8 @@ private: QAction *delete_action_; signals: + void editCaptureComment(); + public slots: void setCaptureFile(capture_file *cf); diff --git a/ui/qt/main_window.cpp b/ui/qt/main_window.cpp index ff3a0f6729..a1eea8a251 100644 --- a/ui/qt/main_window.cpp +++ b/ui/qt/main_window.cpp @@ -193,8 +193,6 @@ MainWindow::MainWindow(QWidget *parent) : connect(wsApp, SIGNAL(updateRecentItemStatus(const QString &, qint64, bool)), this, SLOT(updateRecentFiles())); updateRecentFiles(); - connect(&summary_dialog_, SIGNAL(captureCommentChanged()), this, SLOT(updateForUnsavedChanges())); - #ifdef HAVE_LIBPCAP connect(&capture_interfaces_dialog_, SIGNAL(startCapture()), this, SLOT(startCapture())); connect(&capture_interfaces_dialog_, SIGNAL(stopCapture()), this, SLOT(stopCapture())); @@ -367,6 +365,9 @@ MainWindow::MainWindow(QWidget *parent) : connect(byte_view_tab_, SIGNAL(byteFieldHovered(QString&)), main_ui_->statusBar, SLOT(pushByteStatus(QString&))); + connect(main_ui_->statusBar, SIGNAL(editCaptureComment()), + this, SLOT(on_actionStatisticsCaptureFileProperties_triggered())); + connect(&file_set_dialog_, SIGNAL(fileSetOpenCaptureFile(QString&)), this, SLOT(openCaptureFile(QString&))); @@ -1448,6 +1449,8 @@ void MainWindow::initShowHideMainWidgets() connect(show_hide_actions_, SIGNAL(triggered(QAction*)), this, SLOT(showHideMainWidgets(QAction*))); } +Q_DECLARE_METATYPE(ts_type) + void MainWindow::initTimeDisplayFormatMenu() { if (time_display_actions_) { @@ -1481,6 +1484,8 @@ void MainWindow::initTimeDisplayFormatMenu() main_ui_->actionViewTimeDisplaySecondsWithHoursAndMinutes->setChecked(recent.gui_seconds_format == TS_SECONDS_HOUR_MIN_SEC); } +Q_DECLARE_METATYPE(ts_precision) + void MainWindow::initTimePrecisionFormatMenu() { if (time_precision_actions_) { @@ -1647,7 +1652,7 @@ void MainWindow::setMenusForCaptureFile(bool force_disable) main_ui_->actionFileClose->setEnabled(false); main_ui_->actionFileSave->setEnabled(false); main_ui_->actionFileSaveAs->setEnabled(false); - main_ui_->actionSummary->setEnabled(false); + main_ui_->actionStatisticsCaptureFileProperties->setEnabled(false); main_ui_->actionFileExportPackets->setEnabled(false); main_ui_->menuFileExportPacketDissections->setEnabled(false); main_ui_->actionFileExportPacketBytes->setEnabled(false); @@ -1661,7 +1666,7 @@ void MainWindow::setMenusForCaptureFile(bool force_disable) main_ui_->actionFileClose->setEnabled(true); main_ui_->actionFileSave->setEnabled(cf_can_save(cap_file_)); main_ui_->actionFileSaveAs->setEnabled(cf_can_save_as(cap_file_)); - main_ui_->actionSummary->setEnabled(true); + main_ui_->actionStatisticsCaptureFileProperties->setEnabled(true); /* * "Export Specified Packets..." should be available only if * we can write the file out in at least one format. @@ -1690,7 +1695,7 @@ void MainWindow::setMenusForCaptureInProgress(bool capture_in_progress) { main_ui_->menuFileSet->setEnabled(!capture_in_progress); main_ui_->actionFileQuit->setEnabled(true); - main_ui_->actionSummary->setEnabled(capture_in_progress); + main_ui_->actionStatisticsCaptureFileProperties->setEnabled(capture_in_progress); // XXX Fix packet list heading menu sensitivity // set_menu_sensitivity(ui_manager_packet_list_heading, "/PacketListHeadingPopup/SortAscending", @@ -1712,7 +1717,7 @@ void MainWindow::setMenusForCaptureInProgress(bool capture_in_progress) { void MainWindow::setMenusForCaptureStopping() { main_ui_->actionFileQuit->setEnabled(false); - main_ui_->actionSummary->setEnabled(false); + main_ui_->actionStatisticsCaptureFileProperties->setEnabled(false); #ifdef HAVE_LIBPCAP main_ui_->actionCaptureStart->setChecked(false); main_ui_->actionCaptureStop->setEnabled(false); diff --git a/ui/qt/main_window.h b/ui/qt/main_window.h index 2815347f83..6bf613d97b 100644 --- a/ui/qt/main_window.h +++ b/ui/qt/main_window.h @@ -55,7 +55,6 @@ #include "file_set_dialog.h" #include "filter_action.h" #include "capture_file_dialog.h" -#include "summary_dialog.h" #include "follow_stream_dialog.h" #include "capture_interfaces_dialog.h" #include "about_dialog.h" @@ -63,9 +62,6 @@ class QAction; class QActionGroup; -Q_DECLARE_METATYPE(ts_type) -Q_DECLARE_METATYPE(ts_precision) - namespace Ui { class MainWindow; } @@ -120,7 +116,6 @@ private: ProtoTree *proto_tree_; QWidget *previous_focus_; FileSetDialog file_set_dialog_; - SummaryDialog summary_dialog_; ByteViewTab *byte_view_tab_; QWidget empty_pane_; QActionGroup *show_hide_actions_; @@ -366,7 +361,7 @@ private slots: void on_actionCaptureStart_triggered(); void on_actionCaptureStop_triggered(); - void on_actionSummary_triggered(); + void on_actionStatisticsCaptureFileProperties_triggered(); void on_actionStatisticsFlowGraph_triggered(); void openTcpStreamDialog(int graph_type); void on_actionStatisticsTcpStreamStevens_triggered(); diff --git a/ui/qt/main_window.ui b/ui/qt/main_window.ui index 72f46fba4a..fd13b206d5 100644 --- a/ui/qt/main_window.ui +++ b/ui/qt/main_window.ui @@ -407,7 +407,7 @@ - + @@ -1383,12 +1383,15 @@ QAction::PreferencesRole - + false - Summary + Capture File Properties + + + Capture file properties diff --git a/ui/qt/main_window_slots.cpp b/ui/qt/main_window_slots.cpp index de4c3970c3..82fadbe799 100644 --- a/ui/qt/main_window_slots.cpp +++ b/ui/qt/main_window_slots.cpp @@ -73,6 +73,7 @@ #endif #include "capture_file_dialog.h" +#include "capture_file_properties_dialog.h" #include "conversation_dialog.h" #include "decode_as_dialog.h" #include "endpoint_dialog.h" @@ -579,8 +580,6 @@ void MainWindow::captureFileClosed(const capture_file *cf) { main_ui_->statusBar->popFileStatus(); cap_file_ = NULL; - summary_dialog_.close(); - if (df_combo_box_) { df_combo_box_->lineEdit()->setText(""); @@ -1776,6 +1775,8 @@ void MainWindow::showHideMainWidgets(QAction *action) } } +Q_DECLARE_METATYPE(ts_type) + void MainWindow::setTimestampFormat(QAction *action) { if (!action) { @@ -1795,6 +1796,8 @@ void MainWindow::setTimestampFormat(QAction *action) } } +Q_DECLARE_METATYPE(ts_precision) + void MainWindow::setTimestampPrecision(QAction *action) { if (!action) { @@ -2552,21 +2555,14 @@ void MainWindow::on_actionCaptureStop_triggered() stopCapture(); } -void MainWindow::on_actionSummary_triggered() +void MainWindow::on_actionStatisticsCaptureFileProperties_triggered() { - summary_dialog_.UpdateValues(); - - if (summary_dialog_.isMinimized() == true) - { - summary_dialog_.showNormal(); - } - else - { - summary_dialog_.show(); - } - - summary_dialog_.raise(); - summary_dialog_.activateWindow(); + CaptureFilePropertiesDialog *capture_file_properties_dialog = new CaptureFilePropertiesDialog(this, cap_file_); + connect(capture_file_properties_dialog, SIGNAL(captureCommentChanged()), + this, SLOT(updateForUnsavedChanges())); + connect(this, SIGNAL(setCaptureFile(capture_file*)), + capture_file_properties_dialog, SLOT(setCaptureFile(capture_file*))); + capture_file_properties_dialog->show(); } #ifdef HAVE_LIBPCAP diff --git a/ui/qt/summary_dialog.cpp b/ui/qt/summary_dialog.cpp deleted file mode 100644 index 36b82f4707..0000000000 --- a/ui/qt/summary_dialog.cpp +++ /dev/null @@ -1,775 +0,0 @@ -/* summary_dialog.cpp - * - * GSoC 2013 - QtShark - * - * Wireshark - Network traffic analyzer - * By Gerald Combs - * 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. - */ - -#include "summary_dialog.h" -#include "ui_summary_dialog.h" - -#include "wireshark_application.h" - -#include - -#include -#include - -SummaryDialog::SummaryDialog(QWidget *parent) : - QDialog(parent), - ui(new Ui::SummaryDialog) -{ - ui->setupUi(this); - - ui->tbDisplay->horizontalHeader()->setVisible(true); - - /* set column widths */ - ui->tbInterfaces->setColumnWidth(0, 305); - ui->tbInterfaces->setColumnWidth(1, 110); - ui->tbInterfaces->setColumnWidth(2, 90); -#if (QT_VERSION < QT_VERSION_CHECK(5, 0, 0)) - ui->tbInterfaces->horizontalHeader()->setResizeMode(3, QHeaderView::Stretch); -#else - ui->tbInterfaces->horizontalHeader()->setSectionResizeMode(3, QHeaderView::Stretch); -#endif - ui->tbInterfaces->setColumnWidth(4, 160); - - ui->tbDisplay->setColumnWidth(0, 265); -#if (QT_VERSION < QT_VERSION_CHECK(5, 0, 0)) - ui->tbDisplay->horizontalHeader()->setResizeMode(1, QHeaderView::Stretch); - ui->tbDisplay->horizontalHeader()->setResizeMode(2, QHeaderView::Stretch); - ui->tbDisplay->horizontalHeader()->setResizeMode(3, QHeaderView::Stretch); -#else - ui->tbDisplay->horizontalHeader()->setSectionResizeMode(1, QHeaderView::Stretch); - ui->tbDisplay->horizontalHeader()->setSectionResizeMode(2, QHeaderView::Stretch); - ui->tbDisplay->horizontalHeader()->setSectionResizeMode(3, QHeaderView::Stretch); -#endif - this->setFixedSize(this->size()); - - connect(ui->buttonBox, SIGNAL(accepted()), this, SLOT(SaveComment())); - connect(ui->buttonBox, SIGNAL(helpRequested()), this, SLOT(HelpButton())); - - bRefresh = ui->buttonBox->addButton(tr("Refresh"), QDialogButtonBox::ActionRole); - connect(bRefresh, SIGNAL(clicked()), this, SLOT(RefreshData())); - - bCopyComment = ui->buttonBox->addButton(tr("Copy To Clipboard"), QDialogButtonBox::ActionRole); - connect(bCopyComment, SIGNAL(clicked()), this, SLOT(CopyComment())); -} - -/* - * Slots - **/ - -void SummaryDialog::RefreshData() -{ - UpdateValues(); -} - -void SummaryDialog::SaveComment() -{ - if (cfile.filename != NULL) - { - if (wtap_dump_can_write(cfile.linktypes, WTAP_COMMENT_PER_SECTION)) - { - gchar *str = g_strdup((gchar*)ui->teCFComments->toPlainText().toStdString().c_str()); - cf_update_capture_comment(&cfile, str); - emit captureCommentChanged(); - } - } -} - -void SummaryDialog::HelpButton() -{ - wsApp->helpTopicAction(HELP_STATS_SUMMARY_DIALOG); -} - -void SummaryDialog::CopyComment() -{ - QClipboard *clipboard = QApplication::clipboard(); - - clipboard->setText(SummaryToString()); -} - -void SummaryDialog::on_tabWidget_currentChanged(int index) -{ - // if we are showing the comment summary tab, we update it with new values - if (index == 2) - { - UpdateValues(); - ui->pteCommentSummary->clear(); - ui->pteCommentSummary->insertPlainText(SummaryToString()); - } -} - - -/**/ - -QString SummaryDialog::SummaryToString() -{ - UpdateValues(); - - QString summaryStr; - QTextStream out(&summaryStr); - - out << tr("Summary created by Wireshark %1\n\n").arg(get_ws_vcs_version_info()); - - // File Section - out << tr("File: \n"); - out << "\t" << tr("Name:\t\t%1\n").arg(summary_.filename); - out << "\t" << tr("Length:\t\t%1 bytes\n").arg(summary_.file_length); - out << "\t" << tr("Format:\t\t%1%2\n") - .arg(wtap_file_type_subtype_string(summary_.file_type)) - .arg(summary_.iscompressed? tr(" (gzip compressed)") : ""); - out << "\t" << tr("Encapsulation:\t\t%1\n").arg(ui->lEncapsulation->text()); - - out << "\n\n"; - - // Time Section - out << tr("Time:\n"); - if (summary_.packet_count_ts == summary_.packet_count && - summary_.packet_count >= 1) - { - - // start time - out << "\t" << tr("First packet:\t\t%1\n").arg(ui->lFirstPacket->text()); - - // stop time - out << "\t" << tr("Last packet:\t\t%1\n").arg(ui->lLastPacket->text()); - - // elapsed seconds (capture duration) - if (summary_.packet_count_ts >= 2) { - out << "\t" << tr("Elapsed:\t\t%1\n").arg(ui->lElapsed->text()); - } - - } - out << "\n\n"; - - // Capture Section - out << tr("Capture:\n"); - -// // capture HW -// if (summary_.shb_hardware){ -// out << INDENT << tr("Capture HW: %1\n").arg(ui_->captureHWLabel->text()); -// } - // capture OS - if (summary_.shb_os) - { - out << "\t" << tr("OS:\t%1\n").arg(ui->lOS->text()); - } - // capture application - if (summary_.shb_user_appl) - { - out << "\t" << tr("Capture application:\t%1\n").arg(ui->lCaptureApp->text()); - } - - out << "\n"; - - // capture interfaces info - for (int i = 0; i < ui->tbInterfaces->rowCount(); i++) - { - out << "\t" << ui->tbInterfaces->item(i,0)->text() << "\n"; - out << "\t" << "\t" << tr("Dropped packets:\t%1\n") - .arg(ui->tbInterfaces->item(i,1)->text()); - out << "\t" << "\t" << tr("Capture filter:\t\t%1\n") - .arg(ui->tbInterfaces->item(i,2)->text()); - out << "\t" << "\t" << tr("Link type:\t\t%1\n") - .arg(ui->tbInterfaces->item(i,3)->text()); - out << "\t" << "\t" << tr("Packet size limit:\t%1\n") - .arg(ui->tbInterfaces->item(i,4)->text()); - } - - out << "\n\n"; - - // Statistics Section - out << tr("Statistics:\n"); - for (int i = 0; i < ui->tbDisplay->rowCount(); i++) - { - out << "\t" << tr("%1:\t%2") - .arg(ui->tbDisplay->item(i,0)->text()) - .arg(ui->tbDisplay->item(i,1)->text()); - out << "\n"; - } - - out << "\n\n"; - - //Capture Comments Section - reads from GUI buffer - if(ui->teCFComments->isEnabled() - && (!ui->teCFComments->toPlainText().isEmpty())) - { - out << tr("Capture File Comments:\n"); - out << ui->teCFComments->toPlainText() << endl; - } - - return summaryStr; -} - -QString SummaryDialog::TimeToString(time_t ti_time) -{ - struct tm *ti_tm; - QString str; - - ti_tm = localtime(&ti_time); - if (ti_tm == NULL) - { - str = tr("Not representable"); - } - else - { - str = str.sprintf("%04d-%02d-%02d %02d:%02d:%02d", - ti_tm->tm_year + 1900, - ti_tm->tm_mon + 1, - ti_tm->tm_mday, - ti_tm->tm_hour, - ti_tm->tm_min, - ti_tm->tm_sec); - } - return str; -} - - - -void SummaryDialog::UpdateValues() -{ - QString output; - iface_options iface; - - uint i; - - double seconds = 0.0; - double disp_seconds = 0.0; - double marked_seconds = 0.0; - - - memset(&summary_, 0, sizeof(summary_tally)); - - - /* initial computations */ - summary_fill_in(&cfile, &summary_); -#ifdef HAVE_LIBPCAP - summary_fill_in_capture(&cfile, &global_capture_opts, &summary_); -#endif - - seconds = summary_.stop_time - summary_.start_time; - disp_seconds = summary_.filtered_stop - summary_.filtered_start; - marked_seconds = summary_.marked_stop - summary_.marked_start; - - - /* - * File groupbox - * */ - - /* setting the filename */ - ui->lFilename->setText(summary_.filename); - - /* setting the length of the file */ - ui->lLength->setText(QString(tr("%1 bytes (%2 Mbytes)")).arg((ulong)summary_.file_length).arg((float)summary_.file_length/1048576)); - - /* format */ - ui->lFormat->setText(QString("%1%2").arg(wtap_file_type_subtype_string(summary_.file_type), summary_.iscompressed? tr(" (gzip compressed)") : "")); - - /* encapsulation */ - if (summary_.file_encap_type == WTAP_ENCAP_PER_PACKET) - { - for (i = 0; i < summary_.packet_encap_types->len; i++) - { - output = QString(wtap_encap_string(g_array_index(summary_.packet_encap_types, int, i))); - } - } - else - { - output = QString(wtap_encap_string(summary_.file_encap_type)); - } - - ui->lEncapsulation->setText(output); - - /* - * Time groupbox - * */ - - /* First packet and Last packet */ - - ui->lFirstPacket->setText(TimeToString((time_t)summary_.start_time)); - ui->lLastPacket->setText(TimeToString((time_t)summary_.stop_time)); - - /* - * We must have at least two time-stamped packets for the elapsed time - * to be valid. - */ - if (summary_.packet_count_ts >= 2) - { - /* elapsed seconds */ - uint elapsed_time = (unsigned int)summary_.elapsed_time; - if(elapsed_time/86400) - { - output = output.sprintf("%02u days %02u:%02u:%02u", elapsed_time/86400, - elapsed_time%86400/3600, - elapsed_time%3600/60, - elapsed_time%60); - } - else - { - output = output.sprintf("%02u:%02u:%02u", elapsed_time%86400/3600, - elapsed_time%3600/60, - elapsed_time%60); - } - ui->lElapsed->setText(output); - } - - /*============ - * Capture groupbox - *============ */ - - if (summary_.shb_os) - { - ui->lOS->setText(summary_.shb_os); - } - - if (summary_.shb_user_appl) - { - ui->lCaptureApp->setText(summary_.shb_user_appl); - } - - if (wtap_dump_can_write(cfile.linktypes, WTAP_COMMENT_PER_SECTION)) - { - ui->teCFComments->setText(summary_.opt_comment); - } - - /*============ - * Interfaces table - *============ */ - - ui->tbInterfaces->setRowCount(0); - - for (i = 0; i < summary_.ifaces->len; i++) - { - ui->tbInterfaces->setRowCount(ui->tbInterfaces->rowCount() + 1); - iface = g_array_index(summary_.ifaces, iface_options, i); - - /* interface */ - if (iface.descr) - { - output = QString(iface.descr); - } - - else if (iface.name) - { - output = QString(iface.name); - } - - else - { - output = QString(tr("unknown")); - } - - ui->tbInterfaces->setItem(ui->tbInterfaces->rowCount()-1, 0, new QTableWidgetItem(output)); - - - - /* Dropped count */ - if (iface.drops_known) - { - output = QString("%1 (%2 %)").arg(iface.drops).arg(QString::number( - /* MSVC cannot convert from unsigned __int64 to float, so first convert to signed __int64 */ - summary_.packet_count ?(100.0 * (gint64)iface.drops)/summary_.packet_count : 0.0f, 'g', 3)); - } - else - { - output = QString(tr("Unknown")); - } - ui->tbInterfaces->setItem(ui->tbInterfaces->rowCount()-1, 1, new QTableWidgetItem(output)); - - - - /* Capture filter */ - if (iface.cfilter && iface.cfilter[0] != '\0') - { - output = output.sprintf("%s", iface.cfilter); - } - else - { - if (iface.name) - { - output = QString(tr("none")); - } - else - { - output = QString(tr("unknown")); - } - } - ui->tbInterfaces->setItem(ui->tbInterfaces->rowCount()-1, 2, new QTableWidgetItem(output)); - - ui->tbInterfaces->setItem(ui->tbInterfaces->rowCount()-1, 3, new QTableWidgetItem(wtap_encap_string(iface.encap_type))); - - output = output.sprintf(tr("%u bytes").toStdString().c_str(), iface.snap); - ui->tbInterfaces->setItem(ui->tbInterfaces->rowCount()-1, 4, new QTableWidgetItem(output)); - - } - - /*============ - * Display table - *============ */ - - /* Display filter */ - if (summary_.dfilter) - { - - output = QString(summary_.dfilter); - } - else - { - output = QString(tr("none")); - } - - ui->lDisplayFilter->setText(output); - - - /* Ignored packets */ - output = output.sprintf("%i (%.3f%%)", summary_.ignored_count, - summary_.packet_count ? (100.0 * summary_.ignored_count)/summary_.packet_count : 0.0); - - ui->lIgnoredPackets->setText(output); - - - - /* filling the display table*/ - ui->tbDisplay->setRowCount(0); - - - - /* - * Packet count - **/ - - ui->tbDisplay->setRowCount(ui->tbDisplay->rowCount() + 1); - ui->tbDisplay->setItem(ui->tbDisplay->rowCount()-1, 0, new QTableWidgetItem(tr("Packets"))); - - output = output.sprintf("%i", summary_.packet_count); - ui->tbDisplay->setItem(ui->tbDisplay->rowCount()-1, 1, new QTableWidgetItem(output)); - - if (summary_.dfilter) - { - output = output.sprintf("%i (%.3f%%)", summary_.filtered_count, - summary_.packet_count ? - (100.0 * summary_.filtered_count)/summary_.packet_count : 0.0); - - } - else - { - output = output.sprintf("%i (100.000%%)", summary_.packet_count); - } - ui->tbDisplay->setItem(ui->tbDisplay->rowCount()-1, 2, new QTableWidgetItem(output)); - - - output = output.sprintf("%i (%.3f%%)", summary_.marked_count, - summary_.packet_count ? - (100.0 * summary_.marked_count)/summary_.packet_count : 0.0); - ui->tbDisplay->setItem(ui->tbDisplay->rowCount()-1, 3, new QTableWidgetItem(output)); - - /* - * Time between first and last - **/ - ui->tbDisplay->setRowCount(ui->tbDisplay->rowCount() + 1); - - ui->tbDisplay->setItem(ui->tbDisplay->rowCount()-1, 0, new QTableWidgetItem(tr("Between first and last packet"))); - if (seconds > 0) - { - output = output.sprintf(tr("%.3f sec").toStdString().c_str(), seconds); - - } - else - { - output = QString("N/A"); - } - ui->tbDisplay->setItem(ui->tbDisplay->rowCount()-1, 1, new QTableWidgetItem(output)); - - /* Displayed packet count */ - if (summary_.dfilter && disp_seconds > 0) - { - output = output.sprintf(tr("%.3f sec").toStdString().c_str(), disp_seconds); - } - else - { - output = QString("N/A"); - } - ui->tbDisplay->setItem(ui->tbDisplay->rowCount()-1, 2, new QTableWidgetItem(output)); - - /* Marked packet count */ - if (summary_.marked_count && marked_seconds > 0) - { - output = output.sprintf(tr("%.3f sec").toStdString().c_str(), marked_seconds); - } - else - { - output = QString("N/A"); - } - ui->tbDisplay->setItem(ui->tbDisplay->rowCount()-1, 3, new QTableWidgetItem(output)); - - - - /* - * Average packets per second - **/ - - ui->tbDisplay->setRowCount(ui->tbDisplay->rowCount() + 1); - - ui->tbDisplay->setItem(ui->tbDisplay->rowCount()-1, 0, new QTableWidgetItem(tr("Avg. packets/sec"))); - if (seconds > 0) - { - output = output.sprintf("%.3f", summary_.packet_count/seconds); - - } - else - { - output = QString("N/A"); - } - ui->tbDisplay->setItem(ui->tbDisplay->rowCount()-1, 1, new QTableWidgetItem(output)); - - /* Displayed packet count/sec */ - if (summary_.dfilter && disp_seconds > 0) - { - output = output.sprintf("%.3f", summary_.filtered_count/disp_seconds); - } - else - { - output = QString("N/A"); - } - ui->tbDisplay->setItem(ui->tbDisplay->rowCount()-1, 2, new QTableWidgetItem(output)); - - /* Marked packet count/sec */ - if (summary_.marked_count && marked_seconds > 0) - { - output = output.sprintf("%.3f", summary_.marked_count/marked_seconds); - } - else - { - output = QString("N/A"); - } - ui->tbDisplay->setItem(ui->tbDisplay->rowCount()-1, 3, new QTableWidgetItem(output)); - - - /* - * Average packet size - **/ - - ui->tbDisplay->setRowCount(ui->tbDisplay->rowCount() + 1); - - ui->tbDisplay->setItem(ui->tbDisplay->rowCount()-1, 0, new QTableWidgetItem(tr("Avg. packet size"))); - if (summary_.packet_count > 1) - { - output = output.sprintf(tr("%" G_GUINT64_FORMAT " bytes").toStdString().c_str(), - (guint64) ((double)summary_.bytes/summary_.packet_count + 0.5)); - - } - else - { - output = QString("N/A"); - } - ui->tbDisplay->setItem(ui->tbDisplay->rowCount()-1, 1, new QTableWidgetItem(output)); - - - if (summary_.dfilter && summary_.filtered_count > 1) - { - output = output.sprintf(tr("%" G_GUINT64_FORMAT " bytes").toStdString().c_str(), - (guint64) ((double)summary_.filtered_bytes/summary_.filtered_count + 0.5)); - } - else - { - output = QString("N/A"); - } - ui->tbDisplay->setItem(ui->tbDisplay->rowCount()-1, 2, new QTableWidgetItem(output)); - - - if (summary_.marked_count > 1) - { - output = output.sprintf(tr("%" G_GUINT64_FORMAT " bytes").toStdString().c_str(), - (guint64) ((double)summary_.marked_bytes/summary_.marked_count + 0.5)); - } - else - { - output = QString("N/A"); - } - ui->tbDisplay->setItem(ui->tbDisplay->rowCount()-1, 3, new QTableWidgetItem(output)); - - - /* - * Byte count - **/ - - - ui->tbDisplay->setRowCount(ui->tbDisplay->rowCount() + 1); - ui->tbDisplay->setItem(ui->tbDisplay->rowCount()-1, 0, new QTableWidgetItem(tr("Bytes"))); - - - output = QString("%1").arg(summary_.bytes); - - ui->tbDisplay->setItem(ui->tbDisplay->rowCount()-1, 1, new QTableWidgetItem(output)); - - if (summary_.dfilter) - { - output = QString("%1 (%2%)").arg(summary_.filtered_bytes).arg(QString::number( - /* MSVC cannot convert from unsigned __int64 to float, so first convert to signed __int64 */ - summary_.bytes ?(100.0 * (gint64)summary_.filtered_bytes)/summary_.bytes : 0.0f, 'g', 3)); - - } - else - { - output = QString("%1 (100.000%)").arg(summary_.bytes); - } - ui->tbDisplay->setItem(ui->tbDisplay->rowCount()-1, 2, new QTableWidgetItem(output)); - - - if (summary_.marked_count) - { - output = QString("%1 (%2%)").arg(summary_.marked_bytes).arg(QString::number( - /* MSVC cannot convert from unsigned __int64 to float, so first convert to signed __int64 */ - summary_.bytes ?(100.0 * (gint64)summary_.marked_bytes)/summary_.bytes : 0.0f, 'g', 3)); - } - else - { - output = QString("0 (0.000%)"); - } - ui->tbDisplay->setItem(ui->tbDisplay->rowCount()-1, 3, new QTableWidgetItem(output)); - - - - - /* - * Bytes per second - **/ - - ui->tbDisplay->setRowCount(ui->tbDisplay->rowCount() + 1); - - ui->tbDisplay->setItem(ui->tbDisplay->rowCount()-1, 0, new QTableWidgetItem(tr("Avg. bytes/sec"))); - if (seconds > 0) - { - /* MSVC cannot convert from unsigned __int64 to float, so first convert to signed __int64 */ - output = output.sprintf("%.3f", ((gint64) summary_.bytes)/seconds); - - } - else - { - output = QString("N/A"); - } - ui->tbDisplay->setItem(ui->tbDisplay->rowCount()-1, 1, new QTableWidgetItem(output)); - - /* Displayed packet count/sec */ - if (summary_.dfilter && disp_seconds > 0) - { - /* MSVC cannot convert from unsigned __int64 to float, so first convert to signed __int64 */ - output = output.sprintf("%.3f", ((gint64) summary_.filtered_bytes)/disp_seconds); - } - else - { - output = QString("N/A"); - } - ui->tbDisplay->setItem(ui->tbDisplay->rowCount()-1, 2, new QTableWidgetItem(output)); - - /* Marked packet count/sec */ - if (summary_.marked_count && marked_seconds > 0) - { - /* MSVC cannot convert from unsigned __int64 to float, so first convert to signed __int64 */ - output = output.sprintf("%.3f", ((gint64) summary_.marked_bytes)/marked_seconds); - } - else - { - output = QString("N/A"); - } - ui->tbDisplay->setItem(ui->tbDisplay->rowCount()-1, 3, new QTableWidgetItem(output)); - - - /* - * MBits per second - **/ - - ui->tbDisplay->setRowCount(ui->tbDisplay->rowCount() + 1); - - ui->tbDisplay->setItem(ui->tbDisplay->rowCount()-1, 0, new QTableWidgetItem(tr("Avg. MBit/sec"))); - if (seconds > 0) - { - /* MSVC cannot convert from unsigned __int64 to float, so first convert to signed __int64 */ - output = output.sprintf("%.3f", ((gint64) summary_.bytes) * 8.0 / (seconds * 1000.0 * 1000.0)); - - } - else - { - output = QString("N/A"); - } - ui->tbDisplay->setItem(ui->tbDisplay->rowCount()-1, 1, new QTableWidgetItem(output)); - - /* Displayed packet count/sec */ - if (summary_.dfilter && disp_seconds > 0) - { - /* MSVC cannot convert from unsigned __int64 to float, so first convert to signed __int64 */ - output = output.sprintf("%.3f", ((gint64) summary_.filtered_bytes) * 8.0 / (disp_seconds * 1000.0 * 1000.0)); - } - else - { - output = QString("N/A"); - } - ui->tbDisplay->setItem(ui->tbDisplay->rowCount()-1, 2, new QTableWidgetItem(output)); - - /* Marked packet count/sec */ - if (summary_.marked_count && marked_seconds > 0) - { - /* MSVC cannot convert from unsigned __int64 to float, so first convert to signed __int64 */ - output = output.sprintf("%.3f", ((gint64) ((gint64) summary_.marked_bytes) * 8.0 / (marked_seconds * 1000.0 * 1000.0))); - } - else - { - output = QString("N/A"); - } - ui->tbDisplay->setItem(ui->tbDisplay->rowCount()-1, 3, new QTableWidgetItem(output)); - - -} - -SummaryDialog::~SummaryDialog() -{ - delete ui; -} - -void SummaryDialog::changeEvent(QEvent* event) -{ - if (0 != event) - { - switch (event->type()) - { - case QEvent::LanguageChange: - ui->retranslateUi(this); - break; - default: - break; - } - } - QDialog::changeEvent(event); -} - -/* - - * 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: - */ diff --git a/ui/qt/summary_dialog.ui b/ui/qt/summary_dialog.ui deleted file mode 100644 index 9a91f101b0..0000000000 --- a/ui/qt/summary_dialog.ui +++ /dev/null @@ -1,474 +0,0 @@ - - - SummaryDialog - - - - 0 - 0 - 799 - 585 - - - - - 0 - 0 - - - - Wireshark - Summary - - - - :/menu/help/wsicon16.png:/menu/help/wsicon16.png - - - - - - - - 10 - 10 - 781 - 531 - - - - 0 - - - - File capture details - - - - - 10 - 20 - 761 - 111 - - - - File - - - true - - - - - 21 - 21 - 731 - 90 - - - - - - - Name - - - - - - - / - - - - - - - Length - - - - - - - / - - - - - - - Format - - - - - - - / - - - - - - - Encapsulation - - - - - - - / - - - - - - - - - - 10 - 140 - 761 - 91 - - - - Time - - - true - - - - - 22 - 22 - 731 - 67 - - - - - 0 - - - - - First packet - - - - - - - / - - - - - - - Last packet - - - - - - - / - - - - - - - Elapsed - - - - - - - / - - - - - - - - - - 10 - 240 - 761 - 261 - - - - Capture - - - true - - - - - 20 - 100 - 731 - 151 - - - - - 0 - 10 - - - - - - - 20 - 80 - 271 - 16 - - - - Capture file comments - - - - - - 21 - 18 - 731 - 42 - - - - - - - OS - - - - - - - Unknown - - - - - - - Capture app - - - - - - - Unknown - - - - - - layoutWidget_3 - teCFComments - label_17 - - - - - Capture statistics - - - - - 10 - 210 - 751 - 271 - - - - QAbstractItemView::NoEditTriggers - - - true - - - true - - - 0 - - - 4 - - - false - - - false - - - - Traffic - - - - - Captured - - - - - Displayed - - - - - Marked - - - - - - - 10 - 10 - 751 - 151 - - - - QAbstractItemView::NoEditTriggers - - - true - - - true - - - 0 - - - 5 - - - - Interface - - - - - Dropped packets - - - - - Capture filter - - - - - Link type - - - - - Packet size limit - - - - - - - 30 - 170 - 731 - 42 - - - - - - - Display filter - - - - - - - / - - - - - - - Ignored packets - - - - - - - / - - - - - - - - - Comment summary - - - - - 10 - 10 - 751 - 471 - - - - true - - - - - - - - 10 - 550 - 781 - 23 - - - - QDialogButtonBox::Help|QDialogButtonBox::Save - - - - - - - - diff --git a/ui/qt/wireshark_en.ts b/ui/qt/wireshark_en.ts index bddc725ee3..8ec2992cb1 100644 --- a/ui/qt/wireshark_en.ts +++ b/ui/qt/wireshark_en.ts @@ -5896,375 +5896,375 @@ Do you want to switch to "Seconds Since Beginning of Capture" now? SummaryDialog - + Wireshark - Summary - + File capture details - + File - + Name - - - - - - - - - + + + + + + + + + / - + Length - + Format - + Encapsulation - + Time - + First packet - + Last packet - + Elapsed - + Capture - + Capture file comments - + OS - - - + + + Unknown - + Capture app - + Capture statistics - + Traffic - + Captured - + Displayed - + Marked - + Interface - + Dropped packets - + Capture filter - + Link type Link size - + Packet size limit - + Display filter - + Ignored packets - + Comment summary - + Refresh - + Copy To Clipboard - + Summary created by Wireshark %1 - + File: - + Name: %1 - + Length: %1 bytes - + Format: %1%2 - - + + (gzip compressed) - + Encapsulation: %1 - + Time: - + First packet: %1 - + Last packet: %1 - + Elapsed: %1 - + Capture: - + OS: %1 - + Capture application: %1 - + Dropped packets: %1 - + Capture filter: %1 - + Link type: %1 - + Packet size limit: %1 - + Statistics: - + %1: %2 - + Capture File Comments: - + Not representable - + %1 bytes (%2 Mbytes) - - + + unknown - - + + none - + %u bytes - + Packets - + Between first and last packet - - - + + + %.3f sec - + Avg. packets/sec - + Avg. packet size - - - + + + % - + Bytes - + Avg. bytes/sec - + Avg. MBit/sec diff --git a/ui/qt/wireshark_fr.ts b/ui/qt/wireshark_fr.ts index 0e4094f501..7410b2fa2a 100644 --- a/ui/qt/wireshark_fr.ts +++ b/ui/qt/wireshark_fr.ts @@ -6046,375 +6046,375 @@ Voulez-vous passer en "secondes depuis le début de Capture" maintenan SummaryDialog - + Wireshark - Summary Wireshark - Sommaire - + File capture details Détails du fichier de capture - + File Fichier - + Name Nom - - - - - - - - - + + + + + + + + + / / - + Length Longueur - + Format Format - + Encapsulation Encapsulation - + Time Temps - + First packet Premier paquet - + Last packet Dernier paquet - + Elapsed Passé - + Capture Capture - + Capture file comments Commentaires du fichier de capture - + OS - - - + + + Unknown Inconnu - + Capture app Application de Capture - + Capture statistics Statistiques de Capture - + Traffic Trafic - + Captured Capturés - + Displayed Affichés - + Marked Marqués - + Interface Interface - + Dropped packets Paquets supprimés - + Capture filter Filtre de capture - + Link type Link size Taille du lien - + Packet size limit Limite de taille de paquets - + Display filter Filtre d'affichage - + Ignored packets Paquets ignorés - + Comment summary Résumé des commentaires - + Refresh Rafraichir - + Copy To Clipboard Copier dans le Presse-papiers - + Summary created by Wireshark %1 Sommaire creé par Wireshark %1 - + File: Fichier: - + Name: %1 Nom:\t\t%1\n - + Length: %1 bytes Longueur:\n\n%1 octets\n - + Format: %1%2 Format:\t\t%1%2\n - - + + (gzip compressed) (compressé gzip) - + Encapsulation: %1 Encapsulation:\t\t%1\n - + Time: Temps:\n - + First packet: %1 Premier Paquet:\t%1\n - + Last packet: %1 Dernier paquet:\t%1\n - + Elapsed: %1 Passé:\t\t%1\n - + Capture: Capture:\n - + OS: %1 OS:\t%1\n - + Capture application: %1 Application de Capture:\t%1\n - + Dropped packets: %1 Paquets supprimés:\t%1\n - + Capture filter: %1 Filtre de Capture:\t\t%1\n - + Link type: %1 Link type:\t\t%1\n - + Packet size limit: %1 Paquet taille limit:\t%1\n - + Statistics: Statistiques:\n - + %1: %2 %1:\t%2 - + Capture File Comments: Commentaires du fichier de capture: - + Not representable non représentable - + %1 bytes (%2 Mbytes) %1 octets (%2 Moctets) - - + + unknown inconnu - - + + none aucun - + %u bytes %u octets - + Packets Paquets - + Between first and last packet Entre le premier et le dernier paquet - - - + + + %.3f sec - + Avg. packets/sec Moyenne paquets/sec - + Avg. packet size Moyenne taille de paquet - - - + + + % - + Bytes Octets - + Avg. bytes/sec Moyenne octets/sec - + Avg. MBit/sec Moyenne MBit/sec diff --git a/ui/qt/wireshark_it.ts b/ui/qt/wireshark_it.ts index b4454c1233..96e025e047 100644 --- a/ui/qt/wireshark_it.ts +++ b/ui/qt/wireshark_it.ts @@ -8527,178 +8527,178 @@ Vuoi passare a "Secondi dall'inizio della cattura" adesso? SummaryDialog - + Wireshark - Summary Wireshark - Sommario - + File capture details Dettagli del file di cattura - + File - + Name Nome - - - - - - - - - + + + + + + + + + / - + Length Lunghezza - + Format Formato - + Encapsulation Incapsulamento - + Time Tempo - + First packet Primo pacchetto - + Last packet Ultimo pacchetto - + Elapsed Trascorso - + Capture Cattura - + Capture file comments Commenti del file di cattura - + OS - - - + + + Unknown Sconosciuto - + Capture app Applicazione di cattura - + Capture statistics Statistiche di cattura - + Traffic Traffico - + Captured Catturati - + Displayed Visualizzati - + Marked Marcati - + Interface Interfaccia - + Dropped packets Pacchetti persi - + Capture filter Filtro di cattura - + Link type Link size Tipo di link - + Packet size limit Dimensione limite del pacchetto - + Display filter Filtro di visualizzazione - + Ignored packets Pacchetti ignorati - + Comment summary Sommario del commento - + Refresh Aggiorna - + Copy To Clipboard Copia nella clipboard - + Summary created by Wireshark %1 @@ -8707,7 +8707,7 @@ Vuoi passare a "Secondi dall'inizio della cattura" adesso? - + File: File: @@ -8715,205 +8715,205 @@ Vuoi passare a "Secondi dall'inizio della cattura" adesso? - + Name: %1 Nome: %1 - + Length: %1 bytes Lunghezza: %1 byte - + Format: %1%2 Formato: %1%2 - - + + (gzip compressed) (compresso con gzip) - + Encapsulation: %1 Incapsulamento: %1 - + Time: Tempo: - + First packet: %1 Primo pacchetto: %1 - + Last packet: %1 Ultimo pacchetto: %1 - + Elapsed: %1 Trascorso: %1 - + Capture: Cattura: - + OS: %1 - + Capture application: %1 Applicazione di cattura: %1 - + Dropped packets: %1 Pacchetti persi: %1 - + Capture filter: %1 Filtro di cattura: %1 - + Link type: %1 Dipo di link: %1 - + Packet size limit: %1 Dimensione limite del pacchetto: %1 - + Statistics: Statistiche: - + %1: %2 - + Capture File Comments: Commenti del file di cattura: - + Not representable Non rappresentabile - + %1 bytes (%2 Mbytes) %1 byte (%2 Mbyte) - - + + unknown sconociuto - - + + none nessuno - + %u bytes %u byte - + Packets Pacchetti - + Between first and last packet Tra il primo e l'ultimo pacchetto - - - + + + %.3f sec - + Avg. packets/sec Pacchetti/sec (media) - + Avg. packet size Dimensione media dei pacchetti - - - + + + % - + Bytes Byte - + Avg. bytes/sec Byte/sec (media) - + Avg. MBit/sec Mbit/s (media) diff --git a/ui/qt/wireshark_ja_JP.ts b/ui/qt/wireshark_ja_JP.ts index 9de88c27f6..15ec59bdd3 100644 --- a/ui/qt/wireshark_ja_JP.ts +++ b/ui/qt/wireshark_ja_JP.ts @@ -8334,238 +8334,238 @@ Do you want to switch to "Seconds Since Beginning of Capture" now? SummaryDialog - + Wireshark - Summary Wireshark - 統計 - + File capture details ファイルキャプチャ詳細 - + File ファイル - + Name 名前 - - - - - - - - - + + + + + + + + + / / - + Length 長さ - + Format フォーマット - + Encapsulation カプセル化 - + Time 時間 - + First packet 最初のパケット - + Last packet 最後のパケット - + Elapsed 経過時間 - + Capture キャプチャ - + Capture file comments キャプチャファイルコメント - + OS OS - - - + + + Unknown 不明 - + Capture app キャプチャアプリケーション - + Capture statistics キャプチャ統計 - + Traffic トラフィック - + Captured キャプチャされた - + Displayed 表示 - + Marked マークされた - + Interface インタフェース - + Dropped packets ドロップしたパケット - + Capture filter キャプチャフィルタ - + Link type リンク形式 - + Packet size limit パケットサイズ限界 - + Display filter 表示フィルタ - + Ignored packets 無視されたパケット - + Comment summary コメント統計 - + Refresh 更新 - + Copy To Clipboard クリップボードへコピー - + Summary created by Wireshark %1 Wiresharkによって作成された統計 %1 - + File: ファイル: - + Name: %1 名前: %1 - + Length: %1 bytes 長さ: %1 バイト - + Format: %1%2 形式: %1%2 - - + + (gzip compressed) (GZIP 圧縮) - + Encapsulation: %1 カプセル化: %1 - + Time: 時間: - + First packet: %1 最初のパケット: %1 - + Last packet: %1 最後のパケット: %1 - + Elapsed: %1 経過時間: %1 @@ -8573,137 +8573,137 @@ Do you want to switch to "Seconds Since Beginning of Capture" now? - + Capture: キャプチャ: - + OS: %1 OS: %1 - + Capture application: %1 キャプチャアプリケーション: %1 - + Dropped packets: %1 ドロップパケット: %1 - + Capture filter: %1 キャプチャフィルタ: %1 - + Link type: %1 リンク形式: %1 - + Packet size limit: %1 パケットサイズ制限: %1 - + Statistics: 統計: - + %1: %2 %1: %2 - + Capture File Comments: キャプチャファイルコメント: - + Not representable 何も表現できません - + %1 bytes (%2 Mbytes) %1 バイト (%2 メガバイト) - - + + unknown 不明 - - + + none なし - + %u bytes %u バイト - + Packets パケット - + Between first and last packet 最初と最後のパケットの間 - - - + + + %.3f sec %.3f 秒 - + Avg. packets/sec 平均パケット/秒 - + Avg. packet size 平均パケットサイズ - - - + + + % % - + Bytes バイト - + Avg. bytes/sec 平均バイト/秒 - + Avg. MBit/sec 平均MBit/秒 diff --git a/ui/qt/wireshark_zh_CN.ts b/ui/qt/wireshark_zh_CN.ts index 3741225355..cfc253f202 100644 --- a/ui/qt/wireshark_zh_CN.ts +++ b/ui/qt/wireshark_zh_CN.ts @@ -6018,375 +6018,375 @@ Do you want to switch to "Seconds Since Beginning of Capture" now? SummaryDialog - + Wireshark - Summary - + File capture details - + File 文件 - + Name 名称 - - - - - - - - - + + + + + + + + + / - + Length - + Format - + Encapsulation 封装 - + Time - + First packet - + Last packet - + Elapsed - + Capture 捕获 - + Capture file comments - + OS - - - + + + Unknown 未知 - + Capture app - + Capture statistics - + Traffic - + Captured 已捕获 - + Displayed 已显示 - + Marked - + Interface - + Dropped packets - + Capture filter - + Link type Link size - + Packet size limit - + Display filter 显示筛选器 - + Ignored packets - + Comment summary - + Refresh - + Copy To Clipboard - + Summary created by Wireshark %1 - + File: - + Name: %1 - + Length: %1 bytes - + Format: %1%2 - - + + (gzip compressed) - + Encapsulation: %1 - + Time: - + First packet: %1 - + Last packet: %1 - + Elapsed: %1 - + Capture: - + OS: %1 - + Capture application: %1 - + Dropped packets: %1 - + Capture filter: %1 - + Link type: %1 - + Packet size limit: %1 - + Statistics: - + %1: %2 - + Capture File Comments: - + Not representable - + %1 bytes (%2 Mbytes) - - + + unknown 未知 - - + + none - + %u bytes - + Packets - + Between first and last packet - - - + + + %.3f sec - + Avg. packets/sec - + Avg. packet size - - - + + + % - + Bytes - + Avg. bytes/sec - + Avg. MBit/sec