Provides threadsafe access to octave. More...
#include "octave-qt-link.h"
Public Types | |
typedef std::list< std::pair< std::string, std::string > > | filter_list |
Static Public Member Functions | |
static void | append_history (const std::string &hist_entry) |
static void | change_directory (const std::string &dir) |
static void | clear_history (void) |
static void | clear_workspace (void) |
static bool | confirm_shutdown (void) |
static void | connect_link (octave_link *) |
static bool | copy_image_to_clipboard (const std::string &file) |
static int | debug_cd_or_addpath_error (const std::string &file, const std::string &dir, bool addpath_option) |
static bool | disable (void) |
static void | discard_events (void) |
static octave_link * | disconnect_link (bool delete_instance=true) |
static bool | edit_file (const std::string &file) |
static bool | edit_variable (const std::string &name, const octave_value &val) |
static bool | enable (void) |
static bool | enabled (void) |
static void | enter_debugger_event (const std::string &file, int line) |
static void | entered_readline_hook (void) |
static void | execute_command_in_terminal (const std::string &command) |
static void | execute_in_debugger_event (const std::string &file, int line) |
static void | exit_debugger_event (void) |
static std::list< std::string > | file_dialog (const filter_list &filter, const std::string &title, const std::string &filename, const std::string &dirname, const std::string &multimode) |
static bool | file_in_path (const std::string &file, const std::string &dir) |
static void | finished_readline_hook (void) |
static void | generate_events (void) |
static std::list< std::string > | input_dialog (const std::list< std::string > &prompt, const std::string &title, const std::list< float > &nr, const std::list< float > &nc, const std::list< std::string > &defaults) |
static std::pair< std::list< int >, int > | list_dialog (const std::list< std::string > &list, const std::string &mode, int width, int height, const std::list< int > &initial_value, const std::string &name, const std::list< std::string > &prompt, const std::string &ok_string, const std::string &cancel_string) |
static int | message_dialog (const std::string &dlg, const std::string &msg, const std::string &title) |
template<typename T > | |
static void | post_event (T *obj, void(T::*method)(void)) |
template<typename T , typename A > | |
static void | post_event (T *obj, void(T::*method)(A), A arg) |
template<typename T , typename A > | |
static void | post_event (T *obj, void(T::*method)(const A &), const A &arg) |
template<class T , class A , class B > | |
static void | post_event (T *obj, void(T::*method)(const A &, const B &), const A &arg_a, const B &arg_b) |
template<class T , class A , class B , class C > | |
static void | post_event (T *obj, void(T::*method)(const A &, const B &, const C &), const A &arg_a, const B &arg_b, const C &arg_c) |
template<class T , class A , class B , class C , class D > | |
static void | post_event (T *obj, void(T::*method)(const A &, const B &, const C &, const D &), const A &arg_a, const B &arg_b, const C &arg_c, const D &arg_d) |
static void | post_exception (const std::exception_ptr &p) |
static void | post_input_event (void) |
static void | pre_input_event (void) |
static void | process_events (bool disable=false) |
static bool | prompt_new_edit_file (const std::string &file) |
static std::string | question_dialog (const std::string &msg, const std::string &title, const std::string &btn1, const std::string &btn2, const std::string &btn3, const std::string &btndef) |
static bool | register_doc (const std::string &file) |
static void | set_default_prompts (std::string &ps1, std::string &ps2, std::string &ps4) |
static void | set_history (const string_vector &hist) |
static void | set_workspace (void) |
static void | set_workspace (bool top_level, const octave::symbol_scope &scope, bool update_variable_editor=true) |
static bool | show_doc (const std::string &file) |
static bool | show_preferences () |
static bool | unregister_doc (const std::string &file) |
static void | update_breakpoint (bool insert, const std::string &file, int line, const std::string &cond="") |
Protected Member Functions | |
void | do_discard_events (void) |
void | do_entered_readline_hook (void) |
void | do_finished_readline_hook (void) |
void | do_generate_events (void) |
template<typename T > | |
void | do_post_event (T *obj, void(T::*method)(void)) |
template<typename T , typename A > | |
void | do_post_event (T *obj, void(T::*method)(A), A arg) |
template<typename T , typename A > | |
void | do_post_event (T *obj, void(T::*method)(const A &), const A &arg) |
template<class T , class A , class B > | |
void | do_post_event (T *obj, void(T::*method)(const A &, const B &), const A &arg_a, const B &arg_b) |
template<class T , class A , class B , class C > | |
void | do_post_event (T *obj, void(T::*method)(const A &, const B &, const C &), const A &arg_a, const B &arg_b, const C &arg_c) |
template<class T , class A , class B , class C , class D > | |
void | do_post_event (T *obj, void(T::*method)(const A &, const B &, const C &, const D &), const A &arg_a, const B &arg_b, const C &arg_c, const D &arg_d) |
void | do_post_exception (const std::exception_ptr &p) |
void | do_process_events (void) |
void | rethrow_exception_callback (const std::exception_ptr &p) |
Protected Attributes | |
bool | debugging |
octave::mutex * | event_queue_mutex |
octave::event_queue | gui_event_queue |
bool | link_enabled |
Private Member Functions | |
void | do_delete_debugger_pointer (const std::string &file, int line) |
void | do_insert_debugger_pointer (const std::string &file, int line) |
Private Attributes | |
gui_application * | m_app_context |
QMutex | m_mutex |
bool | m_shutdown_confirm_result |
QWaitCondition | m_waitcondition |
Provides threadsafe access to octave.
This class is a wrapper around octave and provides thread safety by buffering access operations to octave and executing them in the readline event hook, which lives in the octave thread.
Definition at line 55 of file octave-qt-link.h.
|
inherited |
Definition at line 237 of file octave-link.h.
octave::octave_qt_link::octave_qt_link | ( | QWidget * | p, |
gui_application * | app_context | ||
) |
|
delete |
|
default |
|
inlinestaticinherited |
Definition at line 295 of file octave-link.h.
Referenced by edit_history_add_hist(), octave::base_reader::octave_gets(), and octave_history_write_timestamp().
|
signal |
|
inlinestaticinherited |
Definition at line 259 of file octave-link.h.
Referenced by octave_change_to_directory().
|
signal |
|
inlinestaticinherited |
Definition at line 301 of file octave-link.h.
Referenced by do_history().
|
signal |
|
inlinestaticinherited |
Definition at line 283 of file octave-link.h.
|
signal |
|
inlinestaticinherited |
Definition at line 96 of file octave-link.h.
References retval.
|
signal |
|
staticinherited |
Definition at line 86 of file octave-link.cc.
References error(), and octave_link::instance.
Referenced by octave::main_window::construct_octave_qt_link().
|
inlinestaticinherited |
Definition at line 175 of file octave-link.h.
References file.
Referenced by QtHandles::Figure::copy_figure_callback().
|
signal |
|
inlinestaticinherited |
Definition at line 250 of file octave-link.h.
References file.
|
signal |
|
inlinestaticinherited |
Definition at line 383 of file octave-link.h.
|
inlinestaticinherited |
Definition at line 90 of file octave-link.h.
|
inlinestaticinherited |
Definition at line 355 of file octave-link.h.
References retval.
|
virtual |
Implements octave_link.
|
virtual |
Implements octave_link.
|
virtual |
Implements octave_link.
|
virtual |
Implements octave_link.
|
virtual |
Implements octave_link.
|
virtual |
Implements octave_link.
|
virtual |
Implements octave_link.
|
private |
|
inlineinherited |
Definition at line 395 of file octave-link.h.
References retval.
|
protectedinherited |
Definition at line 109 of file octave-link.cc.
References octave::action_container::discard(), octave_link::event_queue_mutex, octave_link::gui_event_queue, octave::mutex::lock(), and octave::mutex::unlock().
|
virtual |
Implements octave_link.
|
virtual |
Implements octave_link.
|
inlineinherited |
Definition at line 388 of file octave-link.h.
References retval.
|
virtual |
Implements octave_link.
|
inlineprotectedinherited |
Definition at line 546 of file octave-link.h.
|
virtual |
Implements octave_link.
|
virtual |
Implements octave_link.
|
virtual |
Implements octave_link.
|
virtual |
Implements octave_link.
|
inlineprotectedinherited |
Definition at line 547 of file octave-link.h.
|
protectedinherited |
Definition at line 95 of file octave-link.cc.
|
virtual |
Implements octave_link.
|
private |
|
virtual |
Implements octave_link.
|
virtual |
Implements octave_link.
|
inlineprotectedinherited |
Definition at line 490 of file octave-link.h.
References octave::action_container::add_method(), and method.
|
inlineprotectedinherited |
Definition at line 496 of file octave-link.h.
References octave::action_container::add_method(), arg, and method.
|
inlineprotectedinherited |
Definition at line 502 of file octave-link.h.
References octave::action_container::add_method(), arg, and method.
|
inlineprotectedinherited |
Definition at line 508 of file octave-link.h.
References A, octave::action_container::add_method(), arg_a, arg_b, B, and method.
|
inlineprotectedinherited |
Definition at line 516 of file octave-link.h.
References A, octave::action_container::add_method(), arg_a, arg_b, arg_c, B, C, and method.
|
inlineprotectedinherited |
Definition at line 526 of file octave-link.h.
References A, octave::action_container::add_method(), arg_a, arg_b, arg_c, B, C, and method.
|
inlineprotectedinherited |
Definition at line 541 of file octave-link.h.
References p, and octave_link::rethrow_exception_callback().
|
virtual |
Implements octave_link.
|
virtual |
Implements octave_link.
|
protectedinherited |
Definition at line 99 of file octave-link.cc.
References octave_link::event_queue_mutex, octave_link::gui_event_queue, octave::mutex::lock(), octave::action_container::run(), and octave::mutex::unlock().
|
virtual |
Implements octave_link.
|
virtual |
Implements octave_link.
|
virtual |
Implements octave_link.
|
virtual |
Implements octave_link.
|
virtual |
Implements octave_link.
|
virtual |
Implements octave_link.
|
virtual |
Implements octave_link.
|
virtual |
Implements octave_link.
|
virtual |
Implements octave_link.
|
virtual |
Implements octave_link.
|
inlinestaticinherited |
Definition at line 181 of file octave-link.h.
References file.
Referenced by F__octave_link_edit_file__().
|
signal |
|
inlinestaticinherited |
|
signal |
|
inlinestaticinherited |
Definition at line 378 of file octave-link.h.
|
inlinestaticinherited |
Definition at line 402 of file octave-link.h.
Referenced by F__octave_link_enabled__(), and octave_link::set_workspace().
|
inlinestaticinherited |
Definition at line 319 of file octave-link.h.
References file.
|
signal |
|
inlinestaticinherited |
Definition at line 162 of file octave-link.h.
Referenced by octave_readline_hook().
|
inlinestaticinherited |
Definition at line 266 of file octave-link.h.
References command.
|
signal |
|
inlinestaticinherited |
Definition at line 329 of file octave-link.h.
References file.
|
inlinestaticinherited |
Definition at line 335 of file octave-link.h.
Referenced by octave::base_reader::octave_gets().
|
signal |
|
inlinestaticinherited |
Definition at line 240 of file octave-link.h.
References octave::sys::file_ops::dirname(), filename, and filter().
Referenced by F__octave_link_file_dialog__().
|
static |
|
inlinestaticinherited |
Definition at line 168 of file octave-link.h.
Referenced by octave_readline_hook().
|
inlinestaticinherited |
Definition at line 70 of file octave-link.h.
Referenced by octave_readline_hook().
|
inlinestaticinherited |
Definition at line 226 of file octave-link.h.
Referenced by F__octave_link_input_dialog__().
|
signal |
|
inlinestaticinherited |
Definition at line 209 of file octave-link.h.
References list, mode, and name.
Referenced by F__octave_link_list_dialog__().
|
inline |
Definition at line 152 of file octave-qt-link.h.
References m_mutex.
Referenced by octave::main_window::confirm_shutdown_octave().
|
inlinestaticinherited |
Definition at line 193 of file octave-link.h.
Referenced by F__octave_link_message_dialog__().
|
delete |
|
inlinestaticinherited |
Definition at line 107 of file octave-link.h.
References method.
Referenced by octave::octave_command_queue::add_cmd(), QtHandles::Canvas::canvasMouseReleaseEvent(), octave::main_window::construct(), QtHandles::Figure::editCopy(), QtHandles::Figure::eventNotifyBefore(), octave::octave_command_queue::execute_command_callback(), QtHandles::Figure::fileSaveFigure(), octave::main_window::handle_clear_command_window_request(), octave::main_window::handle_clear_history_request(), octave::main_window::handle_clear_workspace_request(), octave::file_editor_tab::handle_context_menu_break_condition(), octave::main_window::handle_load_workspace_request(), octave::main_window::handle_new_figure_request(), octave::main_window::handle_rename_variable_request(), octave::file_editor_tab::handle_request_add_breakpoint(), octave::file_editor_tab::handle_request_remove_breakpoint(), octave::main_window::handle_save_workspace_request(), octave::main_window::handle_undo_request(), octave::main_window::handle_variable_editor_update(), octave::file_editor_tab::remove_all_breakpoints(), octave::main_window::set_current_working_directory(), octave::main_window::set_screen_size(), and octave::variable_editor_model::update_data_cache().
|
inlinestaticinherited |
Definition at line 114 of file octave-link.h.
|
inlinestaticinherited |
Definition at line 121 of file octave-link.h.
|
inlinestaticinherited |
Definition at line 156 of file octave-link.h.
References p.
Referenced by QtHandles::GLCanvas::do_print().
|
inlinestaticinherited |
Definition at line 313 of file octave-link.h.
Referenced by octave::base_reader::octave_gets().
|
inlinestaticinherited |
Definition at line 307 of file octave-link.h.
Referenced by octave::base_reader::octave_gets().
Definition at line 79 of file octave-link.h.
Referenced by octave_readline_hook().
|
inlinestaticinherited |
Definition at line 187 of file octave-link.h.
References file.
Referenced by F__octave_link_edit_file__().
|
inlinestaticinherited |
Definition at line 200 of file octave-link.h.
Referenced by F__octave_link_question_dialog__().
|
signal |
|
inlinestaticinherited |
Definition at line 432 of file octave-link.h.
References file.
Referenced by F__octave_link_register_doc__().
|
signal |
|
inlineprotectedinherited |
Definition at line 535 of file octave-link.h.
References p.
Referenced by octave_link::do_post_exception().
|
inlinestaticinherited |
Definition at line 371 of file octave-link.h.
Referenced by set_default_prompts().
|
inlinestaticinherited |
Definition at line 289 of file octave-link.h.
Referenced by do_history(), and initialize_history().
|
signal |
|
staticinherited |
Definition at line 67 of file octave-link.cc.
References octave::__get_symbol_table__(), octave::symbol_table::at_top_level(), octave::symbol_table::current_scope(), octave_link::debugging, octave_link::do_set_workspace(), octave_link::enabled(), and octave_link::instance.
Referenced by octave::main_window::load_workspace_callback(), octave::base_reader::octave_gets(), octave::main_window::refresh_workspace_callback(), and octave::main_window::rename_variable_callback().
|
inlinestaticinherited |
Definition at line 274 of file octave-link.h.
|
signal |
|
inlinestaticinherited |
Definition at line 420 of file octave-link.h.
References file.
Referenced by F__octave_link_show_doc__().
|
signal |
|
inlinestaticinherited |
Definition at line 408 of file octave-link.h.
Referenced by F__octave_link_show_preferences__().
|
signal |
|
inline |
Definition at line 150 of file octave-qt-link.h.
References m_shutdown_confirm_result.
Referenced by octave::main_window::confirm_shutdown_octave().
|
inline |
Definition at line 154 of file octave-qt-link.h.
References m_mutex.
Referenced by octave::main_window::confirm_shutdown_octave().
|
inlinestaticinherited |
Definition at line 444 of file octave-link.h.
References file.
Referenced by F__octave_link_unregister_doc__().
|
signal |
|
inlinestaticinherited |
Definition at line 346 of file octave-link.h.
References file.
Referenced by octave::tree_statement_list::add_breakpoint(), octave::tree_statement_list::remove_all_breakpoints(), and octave::bp_table::remove_breakpoint_1().
|
signal |
|
inline |
Definition at line 153 of file octave-qt-link.h.
References m_mutex, and m_waitcondition.
|
inline |
Definition at line 155 of file octave-qt-link.h.
References m_waitcondition.
Referenced by octave::main_window::confirm_shutdown_octave().
|
protectedinherited |
Definition at line 482 of file octave-link.h.
Referenced by octave_link::set_workspace().
|
protectedinherited |
Definition at line 477 of file octave-link.h.
Referenced by octave_link::do_discard_events(), octave_link::do_process_events(), and octave_link::~octave_link().
|
protectedinherited |
Definition at line 480 of file octave-link.h.
Referenced by octave_link::do_discard_events(), and octave_link::do_process_events().
|
protectedinherited |
Definition at line 483 of file octave-link.h.
|
private |
Definition at line 162 of file octave-qt-link.h.
|
private |
Definition at line 166 of file octave-qt-link.h.
|
private |
Definition at line 164 of file octave-qt-link.h.
Referenced by shutdown_confirmation().
|
private |
Definition at line 167 of file octave-qt-link.h.
Referenced by wait(), and wake_all().