Mercurial > octave
diff libgui/src/octave-qobject.h @ 29796:a0fce019cd1f
additional reorganization of signal/slot connections in main_window class
* main-window.cc (main_window::adopt_editor_widget):
Set m_editor_menubar and m_active_editor and call
m_editor_window->enable_menu_shortcuts here instead of in main_window
constructor.
(main_window::adopt_dock_widgets): Initialize m_previous_dock here
instead of in main_window constructor.
(main_window::adopt_file_browser_widget): Connect file browser signals
to main window slots here instead of in main_window::construct.
(main_window::adopt_editor_widget): Connect file_editor/main_window
signals/slots here instead of in main_window::construct. Connect
qt_link signals to file_editorhere instead of in
main_window::construct_qt_link.
(main_window::make_dock_widget_connections): Connect
QApplication::aboutToQuit signal to dock widget save_settings slot
here instead of in main_window::construct.
* octave-qobject.cc (base_qobject::terminal_widget): Connect
interpreter_output and update_prompt slots to qt_link signals here
instead of in main_window::construct_qt_link.
(base_qobject::file_browser_widget): Connect update_octave_directory
slot to qt_link signal here instead of in main_window::construct_qt_link.
* octave-qobject.h (base_qobject::have_terminal_window): New function.
* qt-interpreter-events.cc (qt_interpreter_events::interpreter_output,
qt_interpreter_events::display_exception): Use
m_octave_qobj.have_terminal_window instead of gui_running to choose
whether to emit signal or write directly to output stream.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Mon, 21 Jun 2021 14:51:13 -0400 |
parents | b4d2fa28d1d4 |
children | 0923ae48a4f7 |
line wrap: on
line diff
--- a/libgui/src/octave-qobject.h Mon Jun 21 15:34:29 2021 +0900 +++ b/libgui/src/octave-qobject.h Mon Jun 21 14:51:13 2021 -0400 @@ -124,6 +124,11 @@ // Provided for convenience. bool gui_running (void) const; + bool have_terminal_window (void) const + { + return ! m_terminal_widget.isNull (); + } + resource_manager& get_resource_manager (void) { return m_resource_manager;