aboutsummaryrefslogtreecommitdiffstats
path: root/ui/qt/wireshark_application.cpp
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2015-06-05 13:17:13 -0700
committerMichael Mann <mmann78@netscape.net>2015-07-03 23:09:13 +0000
commitfdb85029fd9b22b221f7123905f1bad66c04ce91 (patch)
tree4e57f253ece70c5c19ad543608b3be48bbdf2329 /ui/qt/wireshark_application.cpp
parent7fdc534cf967320fce4d560969385d6f19798b8d (diff)
Add ServiceResponseTimeDialog.
Add ServiceResponseTimeDialog as a subclass of TapParameterDialog, similar to StatsTreeDialog. Add initial plumbing for statistics menu items and command line invocation. Don't append "..." to menu item names. Don't add menu icons. In each case this avoids repetitive UI clutter. Change-Id: I463b95c93090160bb81d2e80b16aad389dc0bd6c Reviewed-on: https://code.wireshark.org/review/8864 Reviewed-by: Gerald Combs <gerald@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'ui/qt/wireshark_application.cpp')
-rw-r--r--ui/qt/wireshark_application.cpp26
1 files changed, 26 insertions, 0 deletions
diff --git a/ui/qt/wireshark_application.cpp b/ui/qt/wireshark_application.cpp
index 51627c24eb..b822cd3fc4 100644
--- a/ui/qt/wireshark_application.cpp
+++ b/ui/qt/wireshark_application.cpp
@@ -62,6 +62,7 @@
# include "ui/win32/console_win32.h"
#endif /* _WIN32 */
+#include <QAction>
#include <QDesktopServices>
#include <QDir>
#include <QEvent>
@@ -87,6 +88,7 @@ WiresharkApplication *wsApp = NULL;
static char *last_open_dir = NULL;
static bool updated_last_open_dir = FALSE;
static QList<recent_item_status *> recent_items_;
+static QHash<int, QList<QAction *> > statistics_groups_;
QString WiresharkApplication::window_title_separator_ = QString::fromUtf8(" " UTF8_MIDDLE_DOT " ");
@@ -563,6 +565,30 @@ void WiresharkApplication::emitStatCommandSignal(const QString &menu_path, const
emit openStatCommandDialog(menu_path, arg, userdata);
}
+void WiresharkApplication::emitTapParameterSignal(const QString cfg_abbr, const QString arg, void *userdata)
+{
+ emit openTapParameterDialog(cfg_abbr, arg, userdata);
+}
+
+void WiresharkApplication::addStatisticsGroupItem(int group, QAction *sg_action)
+{
+ if (!statistics_groups_.contains(group)) {
+ statistics_groups_[group] = QList<QAction *>();
+ }
+ statistics_groups_[group] << sg_action;
+}
+
+QList<QAction *> WiresharkApplication::statisticsGroupItems(int group)
+{
+ if (!statistics_groups_.contains(group)) {
+ return QList<QAction *>();
+ }
+
+ QList<QAction *> sgi_list = statistics_groups_[group];
+ std::sort(sgi_list.begin(), sgi_list.end(), qActionLessThan);
+ return sgi_list;
+}
+
#ifdef HAVE_LIBPCAP
static void