diff libinterp/corefcn/event-manager.h @ 27602:ba317c535adb

define new __event_manager_apply_preferences__ function * qt-interpreter-events.h, qt-interpreter-events.cc (): (qt_interpreter_events::apply_preferences): New function. (qt_interpreter_events::apply_new_settings): New signal. * event-manager.h, event-manager.cc (interpreter_events::apply_preferences): New virtual function. (event_manager::apply_preferences): New function. (F__event_manager_apply_preferences__): New function. * main-window.cc (main_window::construct_octave_qt_link): Connect qt_interpreter_events apply_new_settings signal to main_window request_reload_settings slot.
author John W. Eaton <jwe@octave.org>
date Thu, 31 Oct 2019 14:43:47 -0400
parents 6e4519df0be2
children 271b5cd640d7
line wrap: on
line diff
--- a/libinterp/corefcn/event-manager.h	Thu Oct 31 14:36:11 2019 -0400
+++ b/libinterp/corefcn/event-manager.h	Thu Oct 31 14:43:47 2019 -0400
@@ -132,6 +132,8 @@
 
     virtual void show_preferences (void) { }
 
+    virtual void apply_preferences (void) { }
+
     virtual void show_doc (const std::string& /*file*/) { }
 
     virtual bool edit_file (const std::string& /*file*/) { return false; }
@@ -378,6 +380,17 @@
         return false;
     }
 
+    bool apply_preferences (void)
+    {
+      if (enabled ())
+        {
+          instance->apply_preferences ();
+          return true;
+        }
+      else
+        return false;
+    }
+
     bool show_doc (const std::string& file)
     {
       if (enabled ())