diff libgui/src/qt-interpreter-events.cc @ 29057:450920c987b8

update profiler status in gui from interpreter * main-window.cc (handle_gui_status_update): new slot for updating status indicators in the gui triggered by the interpreter; (profiler_session, profiler_session_resume, profiler_stop): do not trigger status update here (construct_octave_qt_link): connect gui status update signal with new related slot; (construct_profile_menu): remove obsolete connection of former status update signal with related slot * main-window.h: remove obsolete update signal of the main window; new slote for updateing status indicators in the gui * qt-interpreter-events.cc (gui_status_update): slot for the event managers status update signal emitting signal for the main window * interpreter-events.h: new slot gui_status_update, new signal gui_status_update_signal * event-manager.cc (__event_manager_gui_status_update__): new function, for now just a stub, which should only be activated if some interpreter action only implemented in m-files requires to update a status indicator in the gui * event-manager.h: new virtual slot for gui status update, new slot calling qt-links gui_status_update * profiler.cc: include event-manager.h; (__profiler_enable__): call event managers gui_status_update depending on enabling/disabling the profiler
author Torsten Lilge <ttl-octave@mailbox.org>
date Thu, 12 Nov 2020 21:11:50 +0100
parents 77494c7a9fbc
children 7854d5752dd2
line wrap: on
line diff
--- a/libgui/src/qt-interpreter-events.cc	Thu Nov 12 18:28:49 2020 +0100
+++ b/libgui/src/qt-interpreter-events.cc	Thu Nov 12 21:11:50 2020 +0100
@@ -447,6 +447,13 @@
     emit unregister_doc_signal (QString::fromStdString (file));
   }
 
+  void qt_interpreter_events::gui_status_update (const std::string& feature,
+                                                 const std::string& status)
+  {
+    emit gui_status_update_signal (QString::fromStdString (feature),
+                                   QString::fromStdString (status));
+  }
+
   void qt_interpreter_events::update_gui_lexer (void)
   {
     emit update_gui_lexer_signal (true);