diff options
author | Stig Bjørlykke <stig@bjorlykke.org> | 2015-08-24 22:12:17 +0200 |
---|---|---|
committer | Stig Bjørlykke <stig@bjorlykke.org> | 2015-08-26 18:03:39 +0000 |
commit | 7b35992b7a15ad2306d23c9f2a66199a7f8ea975 (patch) | |
tree | 623dc2a18ab8b3ef21512990145e8d45a273a8fd | |
parent | bc4487a6fcd1dfe5c3ef602f6eac4651d2b55642 (diff) |
Reload IO Graph Y fields when reload Lua plugins
Change-Id: Ic3b9096c3c25839dd7d7bfe7af71eeb5b0bd745d
Reviewed-on: https://code.wireshark.org/review/10239
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
-rw-r--r-- | ui/qt/io_graph_dialog.cpp | 13 | ||||
-rw-r--r-- | ui/qt/io_graph_dialog.h | 3 | ||||
-rw-r--r-- | ui/qt/main_window.h | 1 | ||||
-rw-r--r-- | ui/qt/main_window_slots.cpp | 3 |
4 files changed, 20 insertions, 0 deletions
diff --git a/ui/qt/io_graph_dialog.cpp b/ui/qt/io_graph_dialog.cpp index 7a457faec1..27cebd9110 100644 --- a/ui/qt/io_graph_dialog.cpp +++ b/ui/qt/io_graph_dialog.cpp @@ -334,6 +334,7 @@ void IOGraphDialog::addGraph(bool checked, QString name, QString dfilter, int co ti->setData(sma_period_col_, Qt::UserRole, moving_average); connect(this, SIGNAL(recalcGraphData(capture_file *)), iog, SLOT(recalcGraphData(capture_file *))); + connect(this, SIGNAL(reloadValueUnitFields()), iog, SLOT(reloadValueUnitField())); connect(&cap_file_, SIGNAL(captureFileClosing()), iog, SLOT(captureFileClosing())); connect(iog, SIGNAL(requestRetap()), this, SLOT(scheduleRetap())); connect(iog, SIGNAL(requestRecalc()), this, SLOT(scheduleRecalc())); @@ -456,6 +457,11 @@ void IOGraphDialog::scheduleRetap(bool now) if (now) updateStatistics(); } +void IOGraphDialog::reloadFields() +{ + emit reloadValueUnitFields(); +} + void IOGraphDialog::keyPressEvent(QKeyEvent *event) { int pan_pixels = event->modifiers() & Qt::ShiftModifier ? 1 : 10; @@ -1931,6 +1937,13 @@ void IOGraph::captureFileClosing() remove_tap_listener(this); } +void IOGraph::reloadValueUnitField() +{ + if (vu_field_.length() > 0) { + setValueUnitField(vu_field_); + } +} + void IOGraph::setInterval(int interval) { interval_ = interval; diff --git a/ui/qt/io_graph_dialog.h b/ui/qt/io_graph_dialog.h index 20c591fc43..243b962d7f 100644 --- a/ui/qt/io_graph_dialog.h +++ b/ui/qt/io_graph_dialog.h @@ -95,6 +95,7 @@ public: public slots: void recalcGraphData(capture_file *cap_file); void captureFileClosing(); + void reloadValueUnitField(); signals: void requestReplot(); @@ -150,6 +151,7 @@ public slots: void scheduleReplot(bool now = false); void scheduleRecalc(bool now = false); void scheduleRetap(bool now = false); + void reloadFields(); protected: void keyPressEvent(QKeyEvent *event); @@ -159,6 +161,7 @@ signals: void goToPacket(int packet_num); void recalcGraphData(capture_file *); void intervalChanged(int interval); + void reloadValueUnitFields(); private: Ui::IOGraphDialog *ui; diff --git a/ui/qt/main_window.h b/ui/qt/main_window.h index 980dc9434d..b69cbb8a29 100644 --- a/ui/qt/main_window.h +++ b/ui/qt/main_window.h @@ -201,6 +201,7 @@ signals: void displayFilterSuccess(bool success); void monospaceFontChanged(const QFont &mono_font); void closePacketDialogs(); + void reloadFields(); public slots: // in main_window_slots.cpp diff --git a/ui/qt/main_window_slots.cpp b/ui/qt/main_window_slots.cpp index 9f38c55386..348707b497 100644 --- a/ui/qt/main_window_slots.cpp +++ b/ui/qt/main_window_slots.cpp @@ -1325,6 +1325,8 @@ void MainWindow::fieldsChanged() // Recreate packet list columns according to new/changed/deleted fields packet_list_->fieldsChanged(CaptureFile::globalCapFile()); } + + emit reloadFields(); } void MainWindow::showAccordionFrame(AccordionFrame *show_frame, bool toggle) @@ -2883,6 +2885,7 @@ void MainWindow::statCommandIOGraph(const char *, void *) { IOGraphDialog *iog_dialog = new IOGraphDialog(*this, capture_file_); connect(iog_dialog, SIGNAL(goToPacket(int)), packet_list_, SLOT(goToPacket(int))); + connect(this, SIGNAL(reloadFields()), iog_dialog, SLOT(reloadFields())); iog_dialog->show(); } |