diff options
author | Gerald Combs <gerald@wireshark.org> | 2015-06-05 13:17:13 -0700 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2015-07-03 23:09:13 +0000 |
commit | fdb85029fd9b22b221f7123905f1bad66c04ce91 (patch) | |
tree | 4e57f253ece70c5c19ad543608b3be48bbdf2329 /ui/qt/main_window.cpp | |
parent | 7fdc534cf967320fce4d560969385d6f19798b8d (diff) | |
download | wireshark-fdb85029fd9b22b221f7123905f1bad66c04ce91.tar.gz |
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/main_window.cpp')
-rw-r--r-- | ui/qt/main_window.cpp | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/ui/qt/main_window.cpp b/ui/qt/main_window.cpp index 7af4370ac1..737aadc511 100644 --- a/ui/qt/main_window.cpp +++ b/ui/qt/main_window.cpp @@ -213,6 +213,8 @@ MainWindow::MainWindow(QWidget *parent) : if (!gbl_cur_main_window_) { connect(wsApp, SIGNAL(openStatCommandDialog(QString,const char*,void*)), this, SLOT(openStatCommandDialog(QString,const char*,void*))); + connect(wsApp, SIGNAL(openTapParameterDialog(QString,const QString,void*)), + this, SLOT(openTapParameterDialog(QString,const QString,void*))); } gbl_cur_main_window_ = this; #ifdef HAVE_LIBPCAP @@ -235,6 +237,7 @@ MainWindow::MainWindow(QWidget *parent) : connect(wsApp, SIGNAL(appInitialized()), this, SLOT(setFeaturesEnabled())); connect(wsApp, SIGNAL(appInitialized()), this, SLOT(zoomText())); connect(wsApp, SIGNAL(appInitialized()), this, SLOT(addStatsPluginsToMenu())); + connect(wsApp, SIGNAL(appInitialized()), this, SLOT(addStatisticsMenus())); connect(wsApp, SIGNAL(appInitialized()), this, SLOT(addExternalMenus())); connect(wsApp, SIGNAL(profileChanging()), this, SLOT(saveWindowGeometry())); @@ -1966,6 +1969,30 @@ void MainWindow::setForCaptureInProgress(gboolean capture_in_progress) #endif } +void MainWindow::addStatisticsMenus() +{ + + // Unsorted + // actionStatistics_REGISTER_STAT_GROUP_UNSORTED should exist and be. + // invisible. + QList<QAction *>unsorted_actions = wsApp->statisticsGroupItems(REGISTER_STAT_GROUP_UNSORTED); + + foreach (QAction *unsorted_action, unsorted_actions) { + main_ui_->menuStatistics->insertAction( + main_ui_->actionStatistics_REGISTER_STAT_GROUP_UNSORTED, + unsorted_action); + connect(unsorted_action, SIGNAL(triggered(bool)), this, SLOT(openTapParameterDialog())); + } + + // Response time + QList<QAction *>sg_actions = wsApp->statisticsGroupItems(REGISTER_STAT_GROUP_RESPONSE_TIME); + + foreach (QAction *sg_action, sg_actions) { + main_ui_->menuServiceResponseTime->addAction(sg_action); + connect(sg_action, SIGNAL(triggered(bool)), this, SLOT(openTapParameterDialog())); + } +} + void MainWindow::externalMenuHelper(ext_menu_t * menu, QMenu * subMenu, gint depth) { QAction * itemAction = NULL; |