aboutsummaryrefslogtreecommitdiffstats
path: root/ui/qt/capture_file_properties_dialog.h
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2014-11-12 14:24:16 -0800
committerGerald Combs <gerald@wireshark.org>2014-12-09 19:02:41 +0000
commitbcaa5d84b1e6637927faf6066d6e57a92c94146e (patch)
tree40fec9b3acb8e127708819c7a0ab0d83f5ad099c /ui/qt/capture_file_properties_dialog.h
parent9681bddaa60fd7cdfdba00ebd87903a860c4166c (diff)
Qt: Update and rename the summary dialog.
Go back to a single view similar to the GTK+ UI. Apply layouts using Qt Designer. Rename the menu item and class to "Capture File Properties". It's not really a summary if it contains details such as "marked average bits per second". We might want to move this to a "Properties" item under the "File" menu similar to other applications. Add the GTK+ summary icon (for now) to the toolbar and open the properties dialog on clicking. Singleton dialogs delenda est[1]. Let the user open as many summaries on as many capture files as he or she wishes. Also, global cfile delenda est[2]. Don't blindly include QtGui. Add specific components instead. Use consistent method names, variable names, and patterns. Try to document what "consistent" means. Adjust the way we display some statistics to match the summary bar, e.g. displayed = captured if we don't have a filter applied. [1] Not really. [2] Yes, really. Change-Id: I11793b1d79dd0c3f70414ac8592b86181da59916 Reviewed-on: https://code.wireshark.org/review/5274 Reviewed-by: Gerald Combs <gerald@wireshark.org>
Diffstat (limited to 'ui/qt/capture_file_properties_dialog.h')
-rw-r--r--ui/qt/capture_file_properties_dialog.h102
1 files changed, 102 insertions, 0 deletions
diff --git a/ui/qt/capture_file_properties_dialog.h b/ui/qt/capture_file_properties_dialog.h
new file mode 100644
index 0000000000..c4df9f1316
--- /dev/null
+++ b/ui/qt/capture_file_properties_dialog.h
@@ -0,0 +1,102 @@
+/* capture_file_properties_dialog.h
+ *
+ * GSoC 2013 - QtShark
+ *
+ * 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 CAPTURE_FILE_PROPERTIES_DIALOG_H
+#define CAPTURE_FILE_PROPERTIES_DIALOG_H
+
+#include "config.h"
+
+#include <string.h>
+#include <time.h>
+
+#include "qt_ui_utils.h"
+
+#include <epan/strutil.h>
+#include <wiretap/wtap.h>
+
+#include "file.h"
+
+#ifdef HAVE_LIBPCAP
+ #include "ui/capture.h"
+ #include "ui/capture_globals.h"
+#endif
+
+#include <QClipboard>
+#include <QDialog>
+
+namespace Ui {
+class SummaryDialog;
+}
+
+class QAbstractButton;
+
+class CaptureFilePropertiesDialog : public QDialog
+{
+ Q_OBJECT
+
+public:
+ explicit CaptureFilePropertiesDialog(QWidget *parent = 0, capture_file *cf = NULL);
+ ~CaptureFilePropertiesDialog();
+
+public slots:
+ void setCaptureFile(capture_file *cf);
+
+signals:
+ void captureCommentChanged();
+
+protected slots:
+ void changeEvent(QEvent* event);
+
+
+private:
+ Ui::SummaryDialog *ui;
+ capture_file *cap_file_;
+
+ QPushButton *refresh_button_;
+ QPushButton *copy_comment_button_;
+
+ 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
+
+/*
+* 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:
+*/