Base class for Octave interfaces that use Qt. More...
#include "octave-qobject.h"
Public Slots | |
void | close_gui (void) |
void | copy_image_to_clipboard (const QString &file, bool remove_file) |
void | execute_command (const QString &command) |
void | handle_variable_editor_update (void) |
void | interpreter_event (const fcn_callback &fcn) |
void | interpreter_event (const meth_callback &meth) |
void | interpreter_interrupt (void) |
void | interpreter_pause (void) |
void | interpreter_ready (void) |
void | interpreter_resume (void) |
void | interpreter_stop (void) |
void | show_command_history_window (void) |
void | show_community_news (int serial) |
void | show_documentation_window (const QString &file) |
void | show_file_browser_window (void) |
void | show_release_notes (void) |
void | show_terminal_window (void) |
void | show_variable_editor_window (const QString &name, const octave_value &value) |
void | show_workspace_window (void) |
void | start_gui (bool gui_app) |
Protected Attributes | |
qt_application & | m_app_context |
int | m_argc |
char ** | m_argv |
QPointer< community_news > | m_community_news |
QPointer< documentation_dock_widget > | m_documentation_widget |
QPointer< file_editor_interface > | m_editor_widget |
QPointer< files_dock_widget > | m_file_browser_widget |
bool | m_gui_app |
QTranslator * | m_gui_tr |
QPointer< history_dock_widget > | m_history_widget |
interpreter_qobject * | m_interpreter_qobj |
bool | m_interpreter_ready |
QThread * | m_main_thread |
main_window * | m_main_window |
octave_qapplication * | m_qapplication |
QTranslator * | m_qsci_tr |
std::shared_ptr< qt_interpreter_events > | m_qt_interpreter_events |
QTranslator * | m_qt_tr |
QPointer< release_notes > | m_release_notes |
resource_manager | m_resource_manager |
shortcut_manager | m_shortcut_manager |
QPointer< terminal_dock_widget > | m_terminal_widget |
bool | m_translators_installed |
QPointer< variable_editor > | m_variable_editor_widget |
workspace_model * | m_workspace_model |
QPointer< workspace_view > | m_workspace_widget |
Base class for Octave interfaces that use Qt.
There are two classes derived from this one. One provides a command-line interface that may use Qt graphics and another provides the full GUI experience.
Definition at line 98 of file octave-qobject.h.
base_qobject::base_qobject | ( | qt_application & | app_context, |
bool | gui_app = false |
||
) |
Definition at line 171 of file octave-qobject.cc.
References resource_manager::config_icon_theme(), config_translators(), copy_image_to_clipboard(), qt_interpreter_events::copy_image_to_clipboard_signal(), qt_interpreter_events::edit_variable_signal(), application::experimental_terminal_widget(), main_window::focus_window(), qt_interpreter_events::focus_window_signal(), qt_application::gui_running(), main_window::handle_octave_ready(), shortcut_manager::init_data(), octave_qapplication::interpreter_event(), interpreter_event(), interpreter_ready(), m_app_context, m_interpreter_qobj, m_interpreter_ready, m_main_thread, m_main_window, m_qapplication, m_resource_manager, m_shortcut_manager, message_handler(), OCTAVE_VERSION, qt_link(), interpreter_qobject::ready(), resource_manager::reload_settings(), qt_interpreter_events::show_command_history_signal(), show_command_history_window(), show_community_news(), main_window::show_community_news_signal(), qt_interpreter_events::show_community_news_signal(), qt_interpreter_events::show_documentation_signal(), show_documentation_window(), qt_interpreter_events::show_file_browser_signal(), show_file_browser_window(), show_release_notes(), main_window::show_release_notes_signal(), qt_interpreter_events::show_release_notes_signal(), show_terminal_window(), qt_interpreter_events::show_terminal_window_signal(), show_variable_editor_window(), qt_interpreter_events::show_workspace_signal(), show_workspace_window(), interpreter_qobject::shutdown_finished(), start_gui(), qt_interpreter_events::start_gui_signal(), and start_main_thread().
base_qobject::~base_qobject | ( | void | ) |
Definition at line 329 of file octave-qobject.cc.
References string_vector::delete_c_str_vec(), m_argv, m_community_news, m_documentation_widget, m_editor_widget, m_file_browser_widget, m_gui_tr, m_history_widget, m_interpreter_qobj, m_main_window, m_qapplication, m_qsci_tr, m_qt_tr, m_terminal_widget, m_variable_editor_widget, m_workspace_model, and m_workspace_widget.
|
inline |
Definition at line 117 of file octave-qobject.h.
References m_app_context.
Referenced by interpreter_qobject::execute().
|
slot |
Definition at line 933 of file octave-qobject.cc.
References application::experimental_terminal_widget(), interpreter::get_app_context(), cmdline_options::gui(), qt_application::gui_running(), interpreter_event(), m_app_context, m_main_window, application::options(), and interpreter::quit().
Referenced by start_gui().
QPointer< community_news > base_qobject::community_news_widget | ( | int | serial = -1 | ) |
Definition at line 728 of file octave-qobject.cc.
References m_community_news.
Referenced by show_community_news().
void base_qobject::config_translators | ( | void | ) |
Definition at line 392 of file octave-qobject.cc.
References resource_manager::config_translators(), m_gui_tr, m_qapplication, m_qsci_tr, m_qt_tr, m_resource_manager, and m_translators_installed.
Referenced by base_qobject().
|
virtual |
Definition at line 745 of file octave-qobject.cc.
References main_window::confirm_shutdown(), and m_main_window.
|
inline |
Definition at line 206 of file octave-qobject.h.
References interpreter_event().
Referenced by main_window::adopt_editor_widget(), and terminal_widget().
|
slot |
Definition at line 1022 of file octave-qobject.cc.
Referenced by base_qobject().
QPointer< documentation_dock_widget > base_qobject::documentation_widget | ( | main_window * | mw = nullptr | ) |
Definition at line 503 of file octave-qobject.cc.
References m_documentation_widget, qt_link(), qt_interpreter_events::register_documentation_signal(), documentation_dock_widget::registerDoc(), qt_interpreter_events::unregister_documentation_signal(), and documentation_dock_widget::unregisterDoc().
Referenced by main_window::adopt_documentation_widget(), and show_documentation_window().
QPointer< file_editor_interface > base_qobject::editor_widget | ( | main_window * | mw = nullptr | ) |
Definition at line 684 of file octave-qobject.cc.
References m_editor_widget.
int base_qobject::exec | ( | void | ) |
Definition at line 423 of file octave-qobject.cc.
References m_main_thread, and m_qapplication.
Referenced by qt_application::execute().
|
slot |
Definition at line 915 of file octave-qobject.cc.
References interpreter::eval(), and interpreter_event().
Referenced by variable_editor_widget().
bool base_qobject::experimental_terminal_widget | ( | void | ) | const |
Definition at line 440 of file octave-qobject.cc.
References application::experimental_terminal_widget(), and m_app_context.
Referenced by main_window::adopt_terminal_widget(), qt_interpreter_events::close_gui(), main_window::closeEvent(), qt_interpreter_events::display_exception(), interpreter_qobject::execute(), main_window::execute_command_in_terminal(), main_window::handle_octave_ready(), qt_interpreter_events::interpreter_output(), interpreter_qobject::pause(), interpreter_qobject::resume(), qt_interpreter_events::start_gui(), interpreter_qobject::stop(), and terminal_widget().
QPointer< files_dock_widget > base_qobject::file_browser_widget | ( | main_window * | mw = nullptr | ) |
Definition at line 530 of file octave-qobject.cc.
References qt_interpreter_events::directory_changed_signal(), m_file_browser_widget, qt_link(), and files_dock_widget::update_octave_directory().
Referenced by main_window::adopt_file_browser_widget(), and show_file_browser_window().
|
inline |
Definition at line 134 of file octave-qobject.h.
References m_main_window.
|
inline |
Definition at line 149 of file octave-qobject.h.
References m_qt_interpreter_events.
Referenced by interpreter_qobject::execute().
|
inline |
Definition at line 139 of file octave-qobject.h.
References m_resource_manager.
Referenced by FileDialog::FileDialog(), files_dock_widget::files_dock_widget(), initial_page::initial_page(), octave_dock_widget::octave_dock_widget(), variable_dock_widget::variable_dock_widget(), welcome_wizard::accept(), variable_editor_view::add_edit_actions(), find_files_dialog::browse_folders(), main_window::browse_for_directory(), settings_dialog::button_clicked(), file_editor::call_custom_editor(), variable_dock_widget::change_floating(), variable_dock_widget::change_fullscreen(), file_editor::closeEvent(), octave_qscintilla::comment_string(), main_window::confirm_shutdown(), community_news::construct(), history_dock_widget::construct(), file_editor::construct(), main_window::construct_debug_menu_item(), main_window::construct_edit_menu(), main_window::construct_file_menu(), main_window::construct_new_menu(), documentation::construct_tool_bar(), main_window::construct_tool_bar(), variable_editor::construct_tool_bar(), files_dock_widget::contextmenu_requested(), octave_qscintilla::contextmenu_run(), documentation_bookmarks::ctx_menu(), octave_qscintilla::ctx_menu_run_finished(), history_dock_widget::ctxMenu(), file_editor_tab::detect_eol_mode(), files_dock_widget::display_directory(), file_editor_tab::do_comment_selected_text(), main_window::do_reset_windows(), variable_editor_stack::do_save(), file_editor_tab::do_save_file(), variable_editor::edit_variable(), file_editor::empty_script(), external_editor_interface::external_editor(), main_window::focus_console_after_command(), settings_dialog::get_dir(), settings_dialog::get_lexer_settings(), qt_interpreter_events::get_named_icon_slot(), file_editor_tab::handle_decode_warning_answer(), file_editor::handle_enter_debug_mode(), file_editor::handle_file_name_changed(), main_window::handle_load_workspace_request(), main_window::handle_octave_ready(), main_window::handle_save_workspace_request(), file_editor::handle_visibility(), workspace_view::header_contextmenu_requested(), files_dock_widget::headercontextmenu_requested(), shortcut_manager::import_export(), shortcut_manager::init(), shortcut_manager::init_data(), file_editor_tab::load_file(), octave_dock_widget::make_widget(), octave_dock_widget::make_window(), file_editor::mru_menu_update(), file_editor_tab::new_file(), main_window::notice_settings(), files_dock_widget::popdownmenu_search_dir(), qt_interpreter_events::prompt_new_edit_file(), main_window::read_settings(), main_window::request_new_function(), file_editor::request_open_file(), main_window::request_open_file(), main_window::request_reload_settings(), main_window::restore_create_file_setting(), find_dialog::restore_settings(), file_editor_tab::save_file_as(), file_editor::save_session(), find_dialog::save_settings(), documentation::save_settings(), files_dock_widget::save_settings(), find_files_dialog::save_settings(), history_dock_widget::save_settings(), octave_dock_widget::save_settings(), set_path_dialog::save_settings(), workspace_view::save_settings(), octave_dock_widget::set_focus_predecessor(), shortcut_manager::set_shortcut(), octave_dock_widget::set_style(), workspace_view::setModel(), shortcut_manager::shortcut(), settings_dialog::show_tab(), files_dock_widget::toggle_header(), workspace_view::toggle_header(), file_editor::toggle_preference(), settings_dialog::update_editor_lexers(), settings_dialog::update_lexer(), file_editor_tab::update_lexer_settings(), settings_dialog::update_terminal_colors(), settings_dialog::update_varedit_colors(), settings_dialog::update_workspace_colors(), settings_dialog::write_changed_settings(), settings_dialog::write_lexer_settings(), and main_window::write_settings().
|
inline |
Definition at line 144 of file octave-qobject.h.
References m_shortcut_manager.
Referenced by octave_dock_widget::octave_dock_widget(), main_window::configure_shortcuts(), settings_dialog::default_shortcut_set(), settings_dialog::export_shortcut_set(), file_editor::handle_exit_debug_mode(), settings_dialog::import_shortcut_set(), dw_main_window::notice_settings(), variable_editor::notice_settings(), documentation::notice_settings(), file_editor::set_shortcuts(), and settings_dialog::write_changed_settings().
|
inline |
Definition at line 164 of file octave-qobject.h.
References m_workspace_model.
Referenced by octave_qscintilla::event().
bool base_qobject::gui_running | ( | void | ) | const |
Definition at line 445 of file octave-qobject.cc.
References qt_application::gui_running(), and m_app_context.
|
slot |
Definition at line 879 of file octave-qobject.cc.
References interpreter::get_evaluator(), interpreter::get_event_manager(), tree_evaluator::get_symbol_info(), interpreter_event(), and event_manager::set_workspace().
Referenced by variable_editor_widget().
|
inline |
Definition at line 129 of file octave-qobject.h.
References m_terminal_widget.
Referenced by qt_interpreter_events::display_exception(), and qt_interpreter_events::interpreter_output().
QPointer< history_dock_widget > base_qobject::history_widget | ( | main_window * | mw = nullptr | ) |
Definition at line 548 of file octave-qobject.cc.
References history_dock_widget::append_history(), qt_interpreter_events::append_history_signal(), history_dock_widget::clear_history(), qt_interpreter_events::clear_history_signal(), interpreter::get_event_manager(), interpreter_event(), m_history_widget, qt_link(), history_dock_widget::set_history(), event_manager::set_history(), and qt_interpreter_events::set_history_signal().
Referenced by main_window::adopt_history_widget(), and show_command_history_window().
|
slot |
Definition at line 972 of file octave-qobject.cc.
References interpreter_qobject::interpreter_event(), and m_interpreter_qobj.
Referenced by base_qobject(), close_gui(), connect_interpreter_events(), main_window::construct(), execute_command(), handle_variable_editor_update(), history_widget(), and workspace_widget().
|
slot |
Definition at line 984 of file octave-qobject.cc.
References interpreter_qobject::interpreter_event(), and m_interpreter_qobj.
|
slot |
Definition at line 996 of file octave-qobject.cc.
References interpreter_qobject::interrupt(), and m_interpreter_qobj.
Referenced by terminal_widget().
|
slot |
Definition at line 1004 of file octave-qobject.cc.
References application::experimental_terminal_widget(), m_app_context, m_interpreter_qobj, and interpreter_qobject::pause().
Referenced by terminal_widget().
|
inline |
Definition at line 159 of file octave-qobject.h.
References m_interpreter_qobj.
Referenced by main_window::adopt_editor_widget(), main_window::construct(), main_window::construct_octave_qt_link(), main_window::file_remove_proxy(), and main_window::handle_set_path_dialog_request().
|
slot |
Definition at line 967 of file octave-qobject.cc.
References m_interpreter_ready.
Referenced by base_qobject().
|
slot |
Definition at line 1016 of file octave-qobject.cc.
References application::experimental_terminal_widget(), m_app_context, m_interpreter_qobj, and interpreter_qobject::resume().
Referenced by terminal_widget().
|
slot |
Definition at line 1010 of file octave-qobject.cc.
References application::experimental_terminal_widget(), m_app_context, m_interpreter_qobj, and interpreter_qobject::stop().
Referenced by terminal_widget().
|
inline |
Definition at line 204 of file octave-qobject.h.
References m_gui_app.
Referenced by main_window::closeEvent().
|
inline |
Definition at line 197 of file octave-qobject.h.
References m_main_thread.
|
inline |
Definition at line 120 of file octave-qobject.h.
References m_qapplication.
Referenced by main_window::notice_settings().
|
inline |
Definition at line 154 of file octave-qobject.h.
References m_qt_interpreter_events.
Referenced by base_qobject(), documentation_widget(), file_browser_widget(), history_widget(), interpreter_qobject::qt_link(), start_gui(), terminal_widget(), variable_editor_widget(), and workspace_widget().
QPointer< release_notes > base_qobject::release_notes_widget | ( | void | ) |
Definition at line 737 of file octave-qobject.cc.
References m_release_notes.
Referenced by show_release_notes().
|
slot |
Definition at line 838 of file octave-qobject.cc.
References history_widget(), and m_history_widget.
Referenced by base_qobject().
|
slot |
Definition at line 899 of file octave-qobject.cc.
References community_news_widget(), and m_community_news.
Referenced by base_qobject(), and start_gui().
|
slot |
Definition at line 811 of file octave-qobject.cc.
References documentation_widget(), m_documentation_widget, and documentation_dock_widget::showDoc().
Referenced by base_qobject(), and octave_qscintilla::contextmenu_help_doc().
|
slot |
Definition at line 826 of file octave-qobject.cc.
References file_browser_widget(), and m_file_browser_widget.
Referenced by base_qobject().
|
slot |
Definition at line 907 of file octave-qobject.cc.
References m_release_notes, and release_notes_widget().
Referenced by base_qobject(), and start_gui().
|
slot |
Definition at line 798 of file octave-qobject.cc.
References m_terminal_widget, and terminal_widget().
Referenced by base_qobject().
|
slot |
Definition at line 862 of file octave-qobject.cc.
References variable_editor::edit_variable(), m_variable_editor_widget, and variable_editor_widget().
Referenced by base_qobject().
|
slot |
Definition at line 850 of file octave-qobject.cc.
References m_workspace_widget, and workspace_widget().
Referenced by base_qobject().
|
slot |
Definition at line 754 of file octave-qobject.cc.
References close_gui(), main_window::close_gui_signal(), qt_interpreter_events::close_gui_signal(), application::experimental_terminal_widget(), main_window::focus_window(), qt_interpreter_events::focus_window_signal(), qt_application::gui_running(), main_window::handle_octave_ready(), m_app_context, m_gui_app, m_interpreter_qobj, m_interpreter_ready, m_main_window, m_qapplication, qt_link(), interpreter_qobject::ready(), show_community_news(), main_window::show_community_news_signal(), show_release_notes(), and main_window::show_release_notes_signal().
Referenced by base_qobject().
void base_qobject::start_main_thread | ( | void | ) |
Definition at line 406 of file octave-qobject.cc.
References m_interpreter_qobj, and m_main_thread.
Referenced by base_qobject().
QPointer< terminal_dock_widget > base_qobject::terminal_widget | ( | main_window * | mw = nullptr | ) |
Definition at line 451 of file octave-qobject.cc.
References connect_interpreter_events(), experimental_terminal_widget(), interpreter_interrupt(), terminal_dock_widget::interpreter_output_signal(), qt_interpreter_events::interpreter_output_signal(), command_widget::interpreter_pause(), interpreter_pause(), command_widget::interpreter_resume(), interpreter_resume(), command_widget::interpreter_stop(), interpreter_stop(), QTerminal::interrupt_signal(), m_terminal_widget, terminal_dock_widget::new_command_line_signal(), qt_interpreter_events::new_command_line_signal(), qt_link(), terminal_dock_widget::update_prompt_signal(), and qt_interpreter_events::update_prompt_signal().
Referenced by main_window::adopt_terminal_widget(), and show_terminal_window().
QPointer< variable_editor > base_qobject::variable_editor_widget | ( | main_window * | mw = nullptr | ) |
Definition at line 700 of file octave-qobject.cc.
References variable_editor::command_signal(), execute_command(), handle_variable_editor_update(), m_variable_editor_widget, qt_link(), variable_editor::refresh(), qt_interpreter_events::refresh_variable_editor_signal(), and variable_editor::updated().
Referenced by main_window::adopt_variable_editor_widget(), and show_variable_editor_window().
QPointer< workspace_view > base_qobject::workspace_widget | ( | main_window * | mw = nullptr | ) |
Definition at line 583 of file octave-qobject.cc.
References workspace_model::clear_workspace(), qt_interpreter_events::clear_workspace_signal(), workspace_view::copy_variable_value_to_clipboard(), event_manager::edit_variable(), workspace_view::edit_variable_signal(), Utils::fromStdString(), interpreter::get_current_scope(), interpreter::get_evaluator(), interpreter::get_event_manager(), workspace_view::handle_model_changed(), interpreter_event(), octave_value::is_undefined(), m_workspace_model, m_workspace_widget, workspace_model::model_changed(), octave_value::print_raw(), qt_link(), symbol_scope::rename(), workspace_view::rename_variable_signal(), workspace_model::set_workspace(), event_manager::set_workspace(), qt_interpreter_events::set_workspace_signal(), and interpreter::varval().
Referenced by main_window::adopt_workspace_widget(), and show_workspace_window().
|
protected |
Definition at line 261 of file octave-qobject.h.
Referenced by base_qobject(), app_context(), close_gui(), experimental_terminal_widget(), gui_running(), interpreter_pause(), interpreter_resume(), interpreter_stop(), and start_gui().
|
protected |
Definition at line 266 of file octave-qobject.h.
|
protected |
Definition at line 267 of file octave-qobject.h.
Referenced by ~base_qobject().
|
protected |
Definition at line 311 of file octave-qobject.h.
Referenced by ~base_qobject(), community_news_widget(), and show_community_news().
|
protected |
Definition at line 299 of file octave-qobject.h.
Referenced by ~base_qobject(), documentation_widget(), and show_documentation_window().
|
protected |
Definition at line 307 of file octave-qobject.h.
Referenced by ~base_qobject(), and editor_widget().
|
protected |
Definition at line 301 of file octave-qobject.h.
Referenced by ~base_qobject(), file_browser_widget(), and show_file_browser_window().
|
protected |
Definition at line 287 of file octave-qobject.h.
Referenced by is_gui_app(), and start_gui().
|
protected |
Definition at line 276 of file octave-qobject.h.
Referenced by ~base_qobject(), and config_translators().
|
protected |
Definition at line 303 of file octave-qobject.h.
Referenced by ~base_qobject(), history_widget(), and show_command_history_window().
|
protected |
Definition at line 283 of file octave-qobject.h.
Referenced by base_qobject(), ~base_qobject(), interpreter_event(), interpreter_interrupt(), interpreter_pause(), interpreter_qobj(), interpreter_resume(), interpreter_stop(), start_gui(), and start_main_thread().
|
protected |
Definition at line 289 of file octave-qobject.h.
Referenced by base_qobject(), interpreter_ready(), and start_gui().
|
protected |
Definition at line 285 of file octave-qobject.h.
Referenced by base_qobject(), exec(), main_thread(), and start_main_thread().
|
protected |
Definition at line 315 of file octave-qobject.h.
Referenced by base_qobject(), ~base_qobject(), close_gui(), confirm_shutdown(), get_main_window(), and start_gui().
|
protected |
Definition at line 269 of file octave-qobject.h.
Referenced by base_qobject(), ~base_qobject(), config_translators(), exec(), qapplication(), and start_gui().
|
protected |
Definition at line 277 of file octave-qobject.h.
Referenced by ~base_qobject(), and config_translators().
|
protected |
Definition at line 281 of file octave-qobject.h.
Referenced by get_qt_interpreter_events(), and qt_link().
|
protected |
Definition at line 275 of file octave-qobject.h.
Referenced by ~base_qobject(), and config_translators().
|
protected |
Definition at line 313 of file octave-qobject.h.
Referenced by release_notes_widget(), and show_release_notes().
|
protected |
Definition at line 271 of file octave-qobject.h.
Referenced by base_qobject(), config_translators(), and get_resource_manager().
|
protected |
Definition at line 273 of file octave-qobject.h.
Referenced by base_qobject(), and get_shortcut_manager().
|
protected |
Definition at line 297 of file octave-qobject.h.
Referenced by ~base_qobject(), have_terminal_window(), show_terminal_window(), and terminal_widget().
|
protected |
Definition at line 279 of file octave-qobject.h.
Referenced by config_translators().
|
protected |
Definition at line 309 of file octave-qobject.h.
Referenced by ~base_qobject(), show_variable_editor_window(), and variable_editor_widget().
|
protected |
Definition at line 291 of file octave-qobject.h.
Referenced by ~base_qobject(), get_workspace_model(), and workspace_widget().
|
protected |
Definition at line 305 of file octave-qobject.h.
Referenced by ~base_qobject(), show_workspace_window(), and workspace_widget().