diff libgui/src/main-window.h @ 16445:3f8d3fc907af

store workspace model in main_window, not in workspace view * main-window.h, main-window.cc (main_window::_workspace_model): New data member. (main_window::construct): Create _workspace_model and make it the model for _workspace_view. connect _workspace_model::model_changed to _workspace_view::model_changed. (main_window::~main_window): Delete _workspace_model. * workspace-view.h, workspace-view.cc (workspace_view::_workspace_model): Delete. Use model() method to get model where needed. (workspace_view::setModel): New function. (workspace_view::view): Rename from _workspace_tree_view. Change all uses. (workspace_view::workspace_view): Don't connect _workspace_model::model_changed signal to workspace_view::model_changed here.
author John W. Eaton <jwe@octave.org>
date Sat, 06 Apr 2013 14:23:52 -0400
parents a971d8bdaadc
children 4b3a4bf8569b
line wrap: on
line diff
--- a/libgui/src/main-window.h
+++ b/libgui/src/main-window.h
@@ -44,6 +44,7 @@
 
 // Own includes
 #include "resource-manager.h"
+#include "workspace-model.h"
 #include "workspace-view.h"
 #include "history-dockwidget.h"
 #include "files-dockwidget.h"
@@ -158,6 +159,9 @@
   QAction *                 _debug_step_out;
   QAction *                 _debug_quit;
 
+  // Data models.
+  workspace_model *         _workspace_model;
+
   // Dock widgets.
   workspace_view *          _workspace_view;
   history_dock_widget *     _history_dock_widget;