diff libgui/src/main-window.h @ 27218:a044202208af

more refactoring of GUI classes that manage the interpreter * interpreter-qobject.h, interpreter-qobject.cc (interpreter_qobject::m_app_context): Delete. (interpreter_qobject::m_octave_qobject, interpreter_qobject::m_qt_link): New data members. (interpreter_qobject::interpreter_qobject): Accept reference to base_qobject as argument instead of qt_application object. Make octave_qt_link connections here. (interpreter_qobject::confirm_shutdown, interpreter_qobject::qt_link): New functions. * main-window.h, main-window.cc (main_window::m_octave_qapp, main_window::m_octave_qt_link): Delete data members. (main_window::m_octave_qobj): New data membeer. (main_window::main_window): Don't pass pointer to octave_qt_link as separate argument. In other member functions, get QApplication and octave_qt_link objects from m_octave_qobj as needed. * octave-qobject.h, octave-qobject.cc (base_qobject::m_octave_qt_link): Delete. (base_qobject::base_qobject): Don't make connections to octave_qt_lnk signals here. (base_qobject::confirm_shutdown_octave_internal): Delete. (base_qobject::confirm_shutdown_octave): Call interpreter_qobject::confirm_shutdown instead of confirm_shutdown_octave_internal. (gui_qobject::confirm_shutdown_octave): Likewise.
author John W. Eaton <jwe@octave.org>
date Fri, 28 Jun 2019 14:42:44 -0400
parents de0762d72d52
children c6807f5cc48b
line wrap: on
line diff
--- a/libgui/src/main-window.h	Thu Jun 27 13:27:22 2019 -0400
+++ b/libgui/src/main-window.h	Fri Jun 28 14:42:44 2019 -0400
@@ -77,7 +77,7 @@
     typedef std::pair <std::string, std::string> name_pair;
     typedef std::pair <int, int> int_pair;
 
-    main_window (base_qobject& qapp, octave_qt_link *lnk);
+    main_window (base_qobject& qapp);
 
     ~main_window (void);
 
@@ -306,9 +306,7 @@
 
     QList<octave_dock_widget *> dock_widget_list (void);
 
-    QApplication *m_octave_qapp;
-
-    octave_qt_link *m_octave_qt_link;
+    base_qobject& m_octave_qobj;
 
     workspace_model *m_workspace_model;