diff libgui/src/main-window.h @ 16453:2e3c652c89d1

improve encapsulation of documentation browser window object * documentation-dockwidget.h, documentation-dockwidget.cc (documentation_dock_widget): Derive from octave_dock_widget, not QDockWidget. (documentation_dock_widget::documentation_dock_widget): Don't connect documentation_dock_widget::visibilityChanged signal to documentation_dock_widget::handle_visibility_changed. Don't connect documentation_dock_widget::topLevelChanged signal to documentation_dock_widget::top_level_changed. Set status tip. (documentation_dock_widget::connect_visibility_changed): New function. (documentation_dock_widget::closeEvent): Delete. (documentation_dock_widget::focus, (documentation_dock_widget::handle_visibility): New functions. (documentation_dock_widget::active_changed): Delete signal. * main-window.h, main-window.cc (main_window::file_browser_window): Rename from documentation_dock_widget. Change all uses. (main_window::main_window): Initialize it. (main_window::focus_documentation, main_window::handle_documentation_visible): Delete. (main_window::connect_visibility_changed): Call doc_browser_window->connect_visibility_changed. (main_window::construct): Don't create _documentation_dock_widget.
author John W. Eaton <jwe@octave.org>
date Sun, 07 Apr 2013 00:43:36 -0400
parents 744ff2fe11ce
children 246d25c8761b
line wrap: on
line diff
--- a/libgui/src/main-window.h	Sat Apr 06 23:58:58 2013 -0400
+++ b/libgui/src/main-window.h	Sun Apr 07 00:43:36 2013 -0400
@@ -1,5 +1,6 @@
 /*
 
+Copyright (C) 2013 John W. Eaton
 Copyright (C) 2011-2012 Jacob Dawid
 
 This file is part of Octave.
@@ -104,10 +105,8 @@
 
   void focus_workspace ();
   void focus_editor ();
-  void focus_documentation ();
   void handle_workspace_visible (bool);
   void handle_editor_visible (bool);
-  void handle_documentation_visible (bool);
 
   void handle_enter_debugger (void);
   void handle_exit_debugger (void);
@@ -160,6 +159,7 @@
   terminal_dock_widget *command_window;
   history_dock_widget *history_window;
   files_dock_widget *file_browser_window;
+  documentation_dock_widget *doc_browser_window;
 
 #ifdef HAVE_QSCINTILLA
   file_editor_interface *   _file_editor;
@@ -174,7 +174,6 @@
 
   // Dock widgets.
   workspace_view *          _workspace_view;
-  documentation_dock_widget*_documentation_dock_widget;
 
   // Toolbars.
   QComboBox *               _current_directory_combo_box;