GNU Octave  8.1.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
base_qobject Class Reference

Base class for Octave interfaces that use Qt. More...

#include "octave-qobject.h"

Inheritance diagram for base_qobject:
Collaboration diagram for base_qobject:

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)
 

Public Member Functions

 base_qobject (qt_application &app_context, bool gui_app=false)
 
 ~base_qobject (void)
 
qt_applicationapp_context (void)
 
QPointer< community_newscommunity_news_widget (int serial=-1)
 
void config_translators (void)
 
virtual bool confirm_shutdown (void)
 
template<typename T >
void connect_interpreter_events (T *widget)
 
QPointer< documentation_dock_widgetdocumentation_widget (main_window *mw=nullptr)
 
QPointer< file_editor_interfaceeditor_widget (main_window *mw=nullptr)
 
int exec (void)
 
bool experimental_terminal_widget (void) const
 
QPointer< files_dock_widgetfile_browser_widget (main_window *mw=nullptr)
 
main_windowget_main_window (void)
 
std::shared_ptr< qt_interpreter_eventsget_qt_interpreter_events (void)
 
resource_managerget_resource_manager (void)
 
shortcut_managerget_shortcut_manager (void)
 
workspace_modelget_workspace_model (void)
 
bool gui_running (void) const
 
bool have_terminal_window (void) const
 
QPointer< history_dock_widgethistory_widget (main_window *mw=nullptr)
 
interpreter_qobjectinterpreter_qobj (void)
 
bool is_gui_app (void) const
 
QThreadmain_thread (void)
 
QApplicationqapplication (void)
 
qt_interpreter_eventsqt_link (void)
 
QPointer< release_notesrelease_notes_widget (void)
 
void start_main_thread (void)
 
QPointer< terminal_dock_widgetterminal_widget (main_window *mw=nullptr)
 
QPointer< variable_editorvariable_editor_widget (main_window *mw=nullptr)
 
QPointer< workspace_viewworkspace_widget (main_window *mw=nullptr)
 

Protected Attributes

qt_applicationm_app_context
 
int m_argc
 
char ** m_argv
 
QPointer< community_newsm_community_news
 
QPointer< documentation_dock_widgetm_documentation_widget
 
QPointer< file_editor_interfacem_editor_widget
 
QPointer< files_dock_widgetm_file_browser_widget
 
bool m_gui_app
 
QTranslator * m_gui_tr
 
QPointer< history_dock_widgetm_history_widget
 
interpreter_qobjectm_interpreter_qobj
 
bool m_interpreter_ready
 
QThreadm_main_thread
 
main_windowm_main_window
 
octave_qapplicationm_qapplication
 
QTranslator * m_qsci_tr
 
std::shared_ptr< qt_interpreter_eventsm_qt_interpreter_events
 
QTranslator * m_qt_tr
 
QPointer< release_notesm_release_notes
 
resource_manager m_resource_manager
 
shortcut_manager m_shortcut_manager
 
QPointer< terminal_dock_widgetm_terminal_widget
 
bool m_translators_installed
 
QPointer< variable_editorm_variable_editor_widget
 
workspace_modelm_workspace_model
 
QPointer< workspace_viewm_workspace_widget
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ base_qobject()

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()

Member Function Documentation

◆ app_context()

qt_application& base_qobject::app_context ( void  )
inline

Definition at line 117 of file octave-qobject.h.

References m_app_context.

Referenced by interpreter_qobject::execute().

◆ close_gui

◆ community_news_widget()

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().

◆ config_translators()

void base_qobject::config_translators ( void  )

◆ confirm_shutdown()

bool base_qobject::confirm_shutdown ( void  )
virtual

Definition at line 745 of file octave-qobject.cc.

References main_window::confirm_shutdown(), and m_main_window.

◆ connect_interpreter_events()

template<typename T >
void base_qobject::connect_interpreter_events ( T *  widget)
inline

Definition at line 206 of file octave-qobject.h.

References interpreter_event().

Referenced by main_window::adopt_editor_widget(), and terminal_widget().

◆ copy_image_to_clipboard

void base_qobject::copy_image_to_clipboard ( const QString &  file,
bool  remove_file 
)
slot

Definition at line 1022 of file octave-qobject.cc.

Referenced by base_qobject().

◆ documentation_widget()

◆ editor_widget()

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.

◆ exec()

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().

◆ execute_command

void base_qobject::execute_command ( const QString &  command)
slot

Definition at line 915 of file octave-qobject.cc.

References interpreter::eval(), and interpreter_event().

Referenced by variable_editor_widget().

◆ experimental_terminal_widget()

◆ file_browser_widget()

◆ get_main_window()

main_window* base_qobject::get_main_window ( void  )
inline

Definition at line 134 of file octave-qobject.h.

References m_main_window.

◆ get_qt_interpreter_events()

std::shared_ptr<qt_interpreter_events> base_qobject::get_qt_interpreter_events ( void  )
inline

Definition at line 149 of file octave-qobject.h.

References m_qt_interpreter_events.

Referenced by interpreter_qobject::execute().

◆ get_resource_manager()

resource_manager& base_qobject::get_resource_manager ( void  )
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().

◆ get_shortcut_manager()

◆ get_workspace_model()

workspace_model* base_qobject::get_workspace_model ( void  )
inline

Definition at line 164 of file octave-qobject.h.

References m_workspace_model.

Referenced by octave_qscintilla::event().

◆ gui_running()

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.

◆ handle_variable_editor_update

void base_qobject::handle_variable_editor_update ( void  )
slot

◆ have_terminal_window()

bool base_qobject::have_terminal_window ( void  ) const
inline

◆ history_widget()

◆ interpreter_event [1/2]

◆ interpreter_event [2/2]

void base_qobject::interpreter_event ( const meth_callback meth)
slot

◆ interpreter_interrupt

void base_qobject::interpreter_interrupt ( void  )
slot

Definition at line 996 of file octave-qobject.cc.

References interpreter_qobject::interrupt(), and m_interpreter_qobj.

Referenced by terminal_widget().

◆ interpreter_pause

void base_qobject::interpreter_pause ( void  )
slot

◆ interpreter_qobj()

◆ interpreter_ready

void base_qobject::interpreter_ready ( void  )
slot

Definition at line 967 of file octave-qobject.cc.

References m_interpreter_ready.

Referenced by base_qobject().

◆ interpreter_resume

void base_qobject::interpreter_resume ( void  )
slot

◆ interpreter_stop

void base_qobject::interpreter_stop ( void  )
slot

◆ is_gui_app()

bool base_qobject::is_gui_app ( void  ) const
inline

Definition at line 204 of file octave-qobject.h.

References m_gui_app.

Referenced by main_window::closeEvent().

◆ main_thread()

QThread* base_qobject::main_thread ( void  )
inline

Definition at line 197 of file octave-qobject.h.

References m_main_thread.

◆ qapplication()

QApplication* base_qobject::qapplication ( void  )
inline

Definition at line 120 of file octave-qobject.h.

References m_qapplication.

Referenced by main_window::notice_settings().

◆ qt_link()

◆ release_notes_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().

◆ show_command_history_window

void base_qobject::show_command_history_window ( void  )
slot

Definition at line 838 of file octave-qobject.cc.

References history_widget(), and m_history_widget.

Referenced by base_qobject().

◆ show_community_news

void base_qobject::show_community_news ( int  serial)
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().

◆ show_documentation_window

void base_qobject::show_documentation_window ( const QString &  file)
slot

◆ show_file_browser_window

void base_qobject::show_file_browser_window ( void  )
slot

Definition at line 826 of file octave-qobject.cc.

References file_browser_widget(), and m_file_browser_widget.

Referenced by base_qobject().

◆ show_release_notes

void base_qobject::show_release_notes ( void  )
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().

◆ show_terminal_window

void base_qobject::show_terminal_window ( void  )
slot

Definition at line 798 of file octave-qobject.cc.

References m_terminal_widget, and terminal_widget().

Referenced by base_qobject().

◆ show_variable_editor_window

void base_qobject::show_variable_editor_window ( const QString &  name,
const octave_value value 
)
slot

◆ show_workspace_window

void base_qobject::show_workspace_window ( void  )
slot

Definition at line 850 of file octave-qobject.cc.

References m_workspace_widget, and workspace_widget().

Referenced by base_qobject().

◆ start_gui

◆ start_main_thread()

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().

◆ terminal_widget()

◆ variable_editor_widget()

◆ workspace_widget()

Member Data Documentation

◆ m_app_context

◆ m_argc

int base_qobject::m_argc
protected

Definition at line 266 of file octave-qobject.h.

◆ m_argv

char** base_qobject::m_argv
protected

Definition at line 267 of file octave-qobject.h.

Referenced by ~base_qobject().

◆ m_community_news

QPointer<community_news> base_qobject::m_community_news
protected

Definition at line 311 of file octave-qobject.h.

Referenced by ~base_qobject(), community_news_widget(), and show_community_news().

◆ m_documentation_widget

QPointer<documentation_dock_widget> base_qobject::m_documentation_widget
protected

◆ m_editor_widget

QPointer<file_editor_interface> base_qobject::m_editor_widget
protected

Definition at line 307 of file octave-qobject.h.

Referenced by ~base_qobject(), and editor_widget().

◆ m_file_browser_widget

QPointer<files_dock_widget> base_qobject::m_file_browser_widget
protected

Definition at line 301 of file octave-qobject.h.

Referenced by ~base_qobject(), file_browser_widget(), and show_file_browser_window().

◆ m_gui_app

bool base_qobject::m_gui_app
protected

Definition at line 287 of file octave-qobject.h.

Referenced by is_gui_app(), and start_gui().

◆ m_gui_tr

QTranslator* base_qobject::m_gui_tr
protected

Definition at line 276 of file octave-qobject.h.

Referenced by ~base_qobject(), and config_translators().

◆ m_history_widget

QPointer<history_dock_widget> base_qobject::m_history_widget
protected

Definition at line 303 of file octave-qobject.h.

Referenced by ~base_qobject(), history_widget(), and show_command_history_window().

◆ m_interpreter_qobj

◆ m_interpreter_ready

bool base_qobject::m_interpreter_ready
protected

Definition at line 289 of file octave-qobject.h.

Referenced by base_qobject(), interpreter_ready(), and start_gui().

◆ m_main_thread

QThread* base_qobject::m_main_thread
protected

Definition at line 285 of file octave-qobject.h.

Referenced by base_qobject(), exec(), main_thread(), and start_main_thread().

◆ m_main_window

main_window* base_qobject::m_main_window
protected

◆ m_qapplication

octave_qapplication* base_qobject::m_qapplication
protected

◆ m_qsci_tr

QTranslator* base_qobject::m_qsci_tr
protected

Definition at line 277 of file octave-qobject.h.

Referenced by ~base_qobject(), and config_translators().

◆ m_qt_interpreter_events

std::shared_ptr<qt_interpreter_events> base_qobject::m_qt_interpreter_events
protected

Definition at line 281 of file octave-qobject.h.

Referenced by get_qt_interpreter_events(), and qt_link().

◆ m_qt_tr

QTranslator* base_qobject::m_qt_tr
protected

Definition at line 275 of file octave-qobject.h.

Referenced by ~base_qobject(), and config_translators().

◆ m_release_notes

QPointer<release_notes> base_qobject::m_release_notes
protected

Definition at line 313 of file octave-qobject.h.

Referenced by release_notes_widget(), and show_release_notes().

◆ m_resource_manager

resource_manager base_qobject::m_resource_manager
protected

Definition at line 271 of file octave-qobject.h.

Referenced by base_qobject(), config_translators(), and get_resource_manager().

◆ m_shortcut_manager

shortcut_manager base_qobject::m_shortcut_manager
protected

Definition at line 273 of file octave-qobject.h.

Referenced by base_qobject(), and get_shortcut_manager().

◆ m_terminal_widget

QPointer<terminal_dock_widget> base_qobject::m_terminal_widget
protected

◆ m_translators_installed

bool base_qobject::m_translators_installed
protected

Definition at line 279 of file octave-qobject.h.

Referenced by config_translators().

◆ m_variable_editor_widget

QPointer<variable_editor> base_qobject::m_variable_editor_widget
protected

◆ m_workspace_model

workspace_model* base_qobject::m_workspace_model
protected

Definition at line 291 of file octave-qobject.h.

Referenced by ~base_qobject(), get_workspace_model(), and workspace_widget().

◆ m_workspace_widget

QPointer<workspace_view> base_qobject::m_workspace_widget
protected

Definition at line 305 of file octave-qobject.h.

Referenced by ~base_qobject(), show_workspace_window(), and workspace_widget().


The documentation for this class was generated from the following files: