diff libgui/src/variable-editor.h @ 27629:8b6e928e0705

in GUI objects, store reference to base_qobject instead of resource_manager We'll need access to both the resource_manager and the shortcut_manager in many objects. The shortcut_manager will be moved to be a member of the base_qobject class instead of being a singleton, so this change will make it easier to access both of these as well as any other core GUI properties in any of the Octave-specific widgets that make up the GUI. Once again, may files are affecte but the changes are straightforward: store a reference to the base_qobject object and access the resource_manager object from that instead of storing a reference to the resource_manager directly.
author John W. Eaton <jwe@octave.org>
date Mon, 04 Nov 2019 13:34:44 -0500
parents 45bb5bbaf291
children 3b078b750181
line wrap: on
line diff
--- a/libgui/src/variable-editor.h	Mon Nov 04 11:18:28 2019 -0500
+++ b/libgui/src/variable-editor.h	Mon Nov 04 13:34:44 2019 -0500
@@ -42,7 +42,7 @@
 
 namespace octave
 {
-  class resource_manager;
+  class base_qobject;
 
   class variable_editor_model;
   class variable_editor_view;
@@ -55,7 +55,7 @@
 
   public:
 
-    variable_dock_widget (QWidget *p, resource_manager& rmgr);
+    variable_dock_widget (QWidget *p, base_qobject& oct_qobj);
 
   signals:
 
@@ -130,7 +130,7 @@
 
   public:
 
-    variable_editor_stack (QWidget *p, resource_manager& rmgr);
+    variable_editor_stack (QWidget *p, base_qobject& oct_qobj);
 
     variable_editor_view *edit_view (void) {return m_edit_view;};
 
@@ -154,7 +154,7 @@
 
     QTextEdit *make_disp_view (QWidget *parent);
 
-    resource_manager& m_resource_manager;
+    base_qobject& m_octave_qobj;
 
     variable_editor_view *m_edit_view;
 
@@ -168,7 +168,7 @@
 
   public:
 
-    variable_editor_view (QWidget *p, resource_manager& rmgr);
+    variable_editor_view (QWidget *p, base_qobject& oct_qobj);
 
     void setModel (QAbstractItemModel *model);
 
@@ -215,7 +215,7 @@
 
     void add_edit_actions (QMenu *menu, const QString& qualifier_string);
 
-    resource_manager& m_resource_manager;
+    base_qobject& m_octave_qobj;
 
     variable_editor_model *m_var_model;
   };
@@ -285,7 +285,7 @@
 
   public:
 
-    variable_editor (QWidget *parent, resource_manager& rmgr);
+    variable_editor (QWidget *parent, base_qobject& oct_qobj);
 
     ~variable_editor (void) = default;