GNU Octave
4.0.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
|
#include "octave-qt-link.h"
Public Types | |
typedef std::list< std::pair < std::string, std::string > > | filter_list |
Public Slots | |
void | terminal_interrupt (void) |
Signals | |
void | append_history_signal (const QString &hist_entry) |
void | change_directory_signal (const QString &dir) |
void | clear_history_signal (void) |
void | clear_workspace_signal (void) |
void | confirm_shutdown_signal (void) |
void | copy_image_to_clipboard_signal (const QString &file, bool remove_file) |
void | delete_debugger_pointer_signal (const QString &, int) |
void | edit_file_signal (const QString &file) |
void | enter_debugger_signal (void) |
void | execute_command_in_terminal_signal (const QString &command) |
void | execute_interpreter_signal (void) |
void | exit_app_signal (int status) |
void | exit_debugger_signal (void) |
void | insert_debugger_pointer_signal (const QString &, int) |
void | set_history_signal (const QStringList &hist) |
void | set_workspace_signal (bool top_level, bool debug, const QString &scopes, const QStringList &symbols, const QStringList &class_names, const QStringList &dimensions, const QStringList &values, const QIntList &complex_flags) |
void | show_doc_signal (const QString &file) |
void | show_preferences_signal (void) |
void | update_breakpoint_marker_signal (bool insert, const QString &file, int line) |
Public Member Functions | |
octave_qt_link (QWidget *p) | |
~octave_qt_link (void) | |
void | do_append_history (const std::string &hist_entry) |
void | do_change_directory (const std::string &dir) |
void | do_clear_history (void) |
void | do_clear_workspace (void) |
bool | do_confirm_shutdown (void) |
bool | do_copy_image_to_clipboard (const std::string &file) |
int | do_debug_cd_or_addpath_error (const std::string &file, const std::string &dir, bool addpath_option) |
bool | do_edit_file (const std::string &file) |
void | do_enter_debugger_event (const std::string &file, int line) |
void | do_execute_command_in_terminal (const std::string &command) |
void | do_execute_in_debugger_event (const std::string &file, int line) |
bool | do_exit (int status) |
void | do_exit_debugger_event (void) |
std::list< std::string > | do_file_dialog (const filter_list &filter, const std::string &title, const std::string &filename, const std::string &pathname, const std::string &multimode) |
std::list< std::string > | do_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) |
std::pair< std::list< int >, int > | do_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) |
int | do_message_dialog (const std::string &dlg, const std::string &msg, const std::string &title) |
void | do_post_input_event (void) |
void | do_pre_input_event (void) |
bool | do_prompt_new_edit_file (const std::string &file) |
std::string | do_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) |
void | do_set_default_prompts (std::string &ps1, std::string &ps2, std::string &ps4) |
void | do_set_history (const string_vector &hist) |
void | do_set_workspace (bool top_level, bool debug, const std::list< workspace_element > &ws) |
void | do_show_doc (const std::string &file) |
void | do_show_preferences (void) |
void | do_update_breakpoint (bool insert, const std::string &file, int line) |
void | execute_interpreter (void) |
void | shutdown_confirmation (bool sd) |
void | update_directory (void) |
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 void | discard_events (void) |
static bool | edit_file (const std::string &file) |
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 bool | exit (int status) |
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<class T > | |
static void | post_event (T *obj, void(T::*method)(void)) |
template<class T , class A > | |
static void | post_event (T *obj, void(T::*method)(A), A arg) |
template<class T , class A > | |
static void | post_event (T *obj, void(T::*method)(const A &), const A &arg) |
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 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 std::list< workspace_element > &ws) |
static bool | show_doc (const std::string &file) |
static bool | show_preferences () |
static void | update_breakpoint (bool insert, const std::string &file, int line) |
Public Attributes | |
QMutex | mutex |
QWaitCondition | waitcondition |
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<class T > | |
void | do_post_event (T *obj, void(T::*method)(void)) |
template<class T , class A > | |
void | do_post_event (T *obj, void(T::*method)(A), A arg) |
template<class T , class A > | |
void | do_post_event (T *obj, void(T::*method)(const A &), const A &arg) |
void | do_process_events (void) |
Protected Attributes | |
bool | debugging |
octave_mutex * | event_queue_mutex |
event_queue | gui_event_queue |
bool | link_enabled |
Private Member Functions | |
octave_qt_link (const octave_qt_link &) | |
void | do_delete_debugger_pointer (const std::string &file, int line) |
void | do_insert_debugger_pointer (const std::string &file, int line) |
octave_qt_link & | operator= (const octave_qt_link &) |
Private Attributes | |
QString | _current_directory |
bool | _new_dir |
bool | _shutdown_confirm_result |
octave_interpreter * | command_interpreter |
QThread * | main_thread |
Definition at line 52 of file octave-qt-link.h.
|
inherited |
Definition at line 198 of file octave-link.h.
octave_qt_link::octave_qt_link | ( | QWidget * | p | ) |
Definition at line 46 of file octave-qt-link.cc.
References _current_directory, _new_dir, command_interpreter, execute_interpreter_signal(), and main_thread.
octave_qt_link::~octave_qt_link | ( | void | ) |
Definition at line 64 of file octave-qt-link.cc.
|
private |
|
inlinestaticinherited |
Definition at line 255 of file octave-link.h.
Referenced by edit_history_add_hist(), octave_base_reader::octave_gets(), and octave_history_write_timestamp().
|
signal |
Definition at line 214 of file moc-octave-qt-link.cc.
Referenced by do_append_history().
|
inlinestaticinherited |
Definition at line 221 of file octave-link.h.
Referenced by octave_change_to_directory().
|
signal |
Definition at line 180 of file moc-octave-qt-link.cc.
Referenced by update_directory().
|
inlinestaticinherited |
Definition at line 261 of file octave-link.h.
Referenced by do_history().
|
signal |
Definition at line 221 of file moc-octave-qt-link.cc.
Referenced by do_clear_history().
|
inlinestaticinherited |
Definition at line 243 of file octave-link.h.
Referenced by Fclear().
|
signal |
Definition at line 201 of file moc-octave-qt-link.cc.
Referenced by do_clear_workspace().
|
inlinestaticinherited |
Definition at line 82 of file octave-link.h.
Referenced by Fquit().
|
signal |
Definition at line 273 of file moc-octave-qt-link.cc.
Referenced by do_confirm_shutdown().
|
staticinherited |
Definition at line 73 of file octave-link.cc.
References error(), and octave_link::instance.
Referenced by main_window::construct_octave_qt_link().
|
inlinestaticinherited |
Definition at line 136 of file octave-link.h.
Referenced by QtHandles::Figure::copy_figure_callback().
|
signal |
Definition at line 166 of file moc-octave-qt-link.cc.
Referenced by do_copy_image_to_clipboard().
|
inlinestaticinherited |
Definition at line 212 of file octave-link.h.
Referenced by file_in_path().
|
signal |
Definition at line 253 of file moc-octave-qt-link.cc.
Referenced by do_delete_debugger_pointer().
|
inlinestaticinherited |
Definition at line 76 of file octave-link.h.
|
virtual |
Implements octave_link.
Definition at line 500 of file octave-qt-link.cc.
References append_history_signal(), and QtHandles::Utils::fromStdString().
|
virtual |
Implements octave_link.
Definition at line 431 of file octave-qt-link.cc.
References _current_directory, _new_dir, and QtHandles::Utils::fromStdString().
|
virtual |
Implements octave_link.
Definition at line 506 of file octave-qt-link.cc.
References clear_history_signal().
|
virtual |
Implements octave_link.
Definition at line 483 of file octave-qt-link.cc.
References clear_workspace_signal().
|
virtual |
Implements octave_link.
Definition at line 73 of file octave-qt-link.cc.
References _shutdown_confirm_result, confirm_shutdown_signal(), mutex, and waitcondition.
|
virtual |
Implements octave_link.
Definition at line 101 of file octave-qt-link.cc.
References copy_image_to_clipboard_signal(), and QtHandles::Utils::fromStdString().
|
virtual |
Implements octave_link.
Definition at line 376 of file octave-qt-link.cc.
References QtHandles::Utils::fromStdString(), QUIWidgetCreator::get_dialog_button(), QUIWidgetCreator::mutex, QUIWidgetCreator::signal_dialog(), uiwidget_creator, and QUIWidgetCreator::waitcondition.
|
private |
Definition at line 566 of file octave-qt-link.cc.
References delete_debugger_pointer_signal(), and QtHandles::Utils::fromStdString().
Referenced by do_execute_in_debugger_event().
|
protectedinherited |
Definition at line 97 of file octave-link.cc.
References action_container::discard(), octave_link::event_queue_mutex, octave_link::gui_event_queue, octave_mutex::lock(), and octave_mutex::unlock().
|
virtual |
Implements octave_link.
Definition at line 109 of file octave-qt-link.cc.
References edit_file_signal(), and QtHandles::Utils::fromStdString().
|
virtual |
Implements octave_link.
Definition at line 522 of file octave-qt-link.cc.
References do_insert_debugger_pointer(), and enter_debugger_signal().
|
inlineprotectedinherited |
Definition at line 396 of file octave-link.h.
|
virtual |
Implements octave_link.
Definition at line 445 of file octave-qt-link.cc.
References execute_command_in_terminal_signal(), and QtHandles::Utils::fromStdString().
|
virtual |
Implements octave_link.
Definition at line 530 of file octave-qt-link.cc.
References do_delete_debugger_pointer().
Implements octave_link.
Definition at line 91 of file octave-qt-link.cc.
References exit_app_signal().
|
virtual |
Implements octave_link.
Definition at line 536 of file octave-qt-link.cc.
References exit_debugger_signal().
|
virtual |
Implements octave_link.
Definition at line 337 of file octave-qt-link.cc.
References arg(), QtHandles::Utils::fromStdString(), QUIWidgetCreator::get_dialog_path(), QUIWidgetCreator::get_dialog_result(), QUIWidgetCreator::get_string_list(), make_filter_list(), QUIWidgetCreator::mutex, QUIWidgetCreator::signal_filedialog(), uiwidget_creator, and QUIWidgetCreator::waitcondition.
|
inlineprotectedinherited |
Definition at line 397 of file octave-link.h.
|
protectedinherited |
Definition at line 82 of file octave-link.cc.
|
virtual |
Implements octave_link.
Definition at line 301 of file octave-qt-link.cc.
References QtHandles::Utils::fromStdString(), QUIWidgetCreator::get_string_list(), make_qstring_list(), QUIWidgetCreator::mutex, QUIWidgetCreator::signal_inputlayout(), uiwidget_creator, and QUIWidgetCreator::waitcondition.
|
private |
Definition at line 560 of file octave-qt-link.cc.
References QtHandles::Utils::fromStdString(), and insert_debugger_pointer_signal().
Referenced by do_enter_debugger_event().
|
virtual |
Implements octave_link.
Definition at line 266 of file octave-qt-link.cc.
References QtHandles::Utils::fromStdString(), QUIWidgetCreator::get_dialog_result(), QUIWidgetCreator::get_list_index(), make_qstring_list(), QUIWidgetCreator::mutex, QUIWidgetCreator::signal_listview(), uiwidget_creator, and QUIWidgetCreator::waitcondition.
|
virtual |
Implements octave_link.
Definition at line 152 of file octave-qt-link.cc.
References QtHandles::Utils::fromStdString(), QUIWidgetCreator::get_dialog_result(), QUIWidgetCreator::mutex, QUIWidgetCreator::signal_dialog(), uiwidget_creator, and QUIWidgetCreator::waitcondition.
|
inlineprotectedinherited |
Definition at line 379 of file octave-link.h.
References action_container::add_method().
|
inlineprotectedinherited |
Definition at line 385 of file octave-link.h.
References action_container::add_method().
|
inlineprotectedinherited |
Definition at line 391 of file octave-link.h.
References action_container::add_method().
|
virtual |
Implements octave_link.
Definition at line 517 of file octave-qt-link.cc.
|
virtual |
Implements octave_link.
Definition at line 512 of file octave-qt-link.cc.
|
protectedinherited |
Definition at line 87 of file octave-link.cc.
References octave_link::event_queue_mutex, octave_link::gui_event_queue, octave_mutex::lock(), action_container::run(), and octave_mutex::unlock().
|
virtual |
Implements octave_link.
Definition at line 117 of file octave-qt-link.cc.
References arg(), QtHandles::Utils::fromStdString(), QUIWidgetCreator::get_dialog_button(), resource_manager::get_settings(), QUIWidgetCreator::mutex, QUIWidgetCreator::signal_dialog(), uiwidget_creator, and QUIWidgetCreator::waitcondition.
|
virtual |
Implements octave_link.
Definition at line 178 of file octave-qt-link.cc.
References QtHandles::Utils::fromStdString(), QUIWidgetCreator::get_dialog_button(), QUIWidgetCreator::mutex, QUIWidgetCreator::signal_dialog(), uiwidget_creator, and QUIWidgetCreator::waitcondition.
|
virtual |
Implements octave_link.
Definition at line 550 of file octave-qt-link.cc.
|
virtual |
Implements octave_link.
Definition at line 489 of file octave-qt-link.cc.
References QtHandles::Utils::fromStdString(), Array< T >::length(), and set_history_signal().
|
virtual |
Implements octave_link.
Definition at line 451 of file octave-qt-link.cc.
References _new_dir, QtHandles::Utils::fromStdString(), set_workspace_signal(), and update_directory().
|
virtual |
Implements octave_link.
Definition at line 643 of file octave-qt-link.cc.
References QtHandles::Utils::fromStdString(), and show_doc_signal().
|
virtual |
Implements octave_link.
Definition at line 637 of file octave-qt-link.cc.
References show_preferences_signal().
|
virtual |
Implements octave_link.
Definition at line 542 of file octave-qt-link.cc.
References QtHandles::Utils::fromStdString(), and update_breakpoint_marker_signal().
|
inlinestaticinherited |
Definition at line 142 of file octave-link.h.
Referenced by F__octave_link_edit_file__().
|
signal |
Definition at line 173 of file moc-octave-qt-link.cc.
Referenced by do_edit_file().
|
inlinestaticinherited |
Definition at line 321 of file octave-link.h.
Referenced by F__octave_link_enabled__(), and octave_link::set_workspace().
|
inlinestaticinherited |
Definition at line 279 of file octave-link.h.
Referenced by get_debug_input().
|
signal |
Definition at line 227 of file moc-octave-qt-link.cc.
Referenced by do_enter_debugger_event().
|
inlinestaticinherited |
Definition at line 123 of file octave-link.h.
Referenced by octave_readline_hook().
|
inlinestaticinherited |
Definition at line 228 of file octave-link.h.
|
signal |
Definition at line 187 of file moc-octave-qt-link.cc.
Referenced by do_execute_command_in_terminal().
|
inlinestaticinherited |
Definition at line 289 of file octave-link.h.
Referenced by execute_in_debugger_handler().
void octave_qt_link::execute_interpreter | ( | void | ) |
Definition at line 67 of file octave-qt-link.cc.
References execute_interpreter_signal().
Referenced by main_window::construct_octave_qt_link().
|
signal |
Definition at line 160 of file moc-octave-qt-link.cc.
Referenced by execute_interpreter(), and octave_qt_link().
Definition at line 92 of file octave-link.h.
Referenced by clean_up_and_exit().
|
signal |
Definition at line 279 of file moc-octave-qt-link.cc.
Referenced by do_exit().
|
inlinestaticinherited |
Definition at line 295 of file octave-link.h.
Referenced by octave_base_reader::octave_gets().
|
signal |
Definition at line 233 of file moc-octave-qt-link.cc.
Referenced by do_exit_debugger_event().
|
inlinestaticinherited |
Definition at line 201 of file octave-link.h.
Referenced by F__octave_link_file_dialog__().
|
static |
Definition at line 573 of file octave-qt-link.cc.
References octave_env::base_pathname(), load_path::contains_canonical(), octave_link::debug_cd_or_addpath_error(), Fcd(), load_path::find_file(), octave_env::get_current_directory(), ovl(), load_path::prepend(), and same_file().
Referenced by octave_cmd_eval::execute().
|
inlinestaticinherited |
Definition at line 129 of file octave-link.h.
Referenced by octave_readline_hook().
|
inlinestaticinherited |
Definition at line 56 of file octave-link.h.
Referenced by octave_readline_hook().
|
inlinestaticinherited |
Definition at line 187 of file octave-link.h.
Referenced by F__octave_link_input_dialog__().
|
signal |
Definition at line 246 of file moc-octave-qt-link.cc.
Referenced by do_insert_debugger_pointer().
|
inlinestaticinherited |
Definition at line 170 of file octave-link.h.
Referenced by F__octave_link_list_dialog__().
|
inlinestaticinherited |
Definition at line 154 of file octave-link.h.
Referenced by F__octave_link_message_dialog__().
|
private |
|
inlinestaticinherited |
Definition at line 103 of file octave-link.h.
Referenced by QtHandles::Canvas::canvasMouseReleaseEvent(), main_window::construct(), QtHandles::Figure::editCopy(), main_window::execute_command_callback(), main_window::execute_debug_callback(), QtHandles::Figure::fileSaveFigure(), main_window::handle_clear_command_window_request(), main_window::handle_clear_history_request(), main_window::handle_clear_workspace_request(), main_window::handle_load_workspace_request(), main_window::handle_new_figure_request(), main_window::handle_rename_variable_request(), main_window::handle_save_workspace_request(), main_window::handle_undo_request(), main_window::queue_command(), main_window::queue_debug(), main_window::run_file_in_terminal(), main_window::set_current_working_directory(), and main_window::set_screen_size().
|
inlinestaticinherited |
Definition at line 110 of file octave-link.h.
|
inlinestaticinherited |
Definition at line 117 of file octave-link.h.
|
inlinestaticinherited |
Definition at line 273 of file octave-link.h.
Referenced by octave_base_reader::octave_gets().
|
inlinestaticinherited |
Definition at line 267 of file octave-link.h.
Referenced by octave_base_reader::octave_gets().
|
inlinestaticinherited |
Definition at line 65 of file octave-link.h.
Referenced by do_octave_atexit(), and octave_readline_hook().
|
inlinestaticinherited |
Definition at line 148 of file octave-link.h.
Referenced by F__octave_link_edit_file__().
|
inlinestaticinherited |
Definition at line 161 of file octave-link.h.
Referenced by F__octave_link_question_dialog__().
|
inlinestaticinherited |
Definition at line 314 of file octave-link.h.
Referenced by set_default_prompts().
|
inlinestaticinherited |
Definition at line 249 of file octave-link.h.
Referenced by do_history(), and initialize_history().
|
signal |
Definition at line 207 of file moc-octave-qt-link.cc.
Referenced by do_set_history().
|
staticinherited |
Definition at line 59 of file octave-link.cc.
References symbol_table::current_scope(), octave_link::debugging, octave_link::do_set_workspace(), octave_link::enabled(), octave_link::instance, symbol_table::top_scope(), and symbol_table::workspace_info().
Referenced by Fclear(), get_debug_input(), main_window::load_workspace_callback(), octave_base_reader::octave_gets(), and main_window::rename_variable_callback().
|
inlinestaticinherited |
Definition at line 236 of file octave-link.h.
|
signal |
Definition at line 194 of file moc-octave-qt-link.cc.
Referenced by do_set_workspace().
|
inlinestaticinherited |
Definition at line 339 of file octave-link.h.
Referenced by F__octave_link_show_doc__().
|
signal |
Definition at line 266 of file moc-octave-qt-link.cc.
Referenced by do_show_doc().
|
inlinestaticinherited |
Definition at line 327 of file octave-link.h.
Referenced by F__octave_link_show_preferences__().
|
signal |
Definition at line 260 of file moc-octave-qt-link.cc.
Referenced by do_show_preferences().
|
inline |
Definition at line 140 of file octave-qt-link.h.
References _shutdown_confirm_result.
Referenced by main_window::confirm_shutdown_octave().
|
slot |
Definition at line 649 of file octave-qt-link.cc.
References command_interpreter, and octave_interpreter::interrupt().
|
inlinestaticinherited |
Definition at line 306 of file octave-link.h.
Referenced by tree_statement_list::add_breakpoint(), bp_table::do_remove_breakpoint_1(), and tree_statement_list::remove_all_breakpoints().
|
signal |
Definition at line 239 of file moc-octave-qt-link.cc.
Referenced by do_update_breakpoint().
void octave_qt_link::update_directory | ( | void | ) |
Definition at line 438 of file octave-qt-link.cc.
References _current_directory, _new_dir, and change_directory_signal().
Referenced by main_window::change_directory_callback(), and do_set_workspace().
|
private |
Definition at line 160 of file octave-qt-link.h.
Referenced by do_change_directory(), octave_qt_link(), and update_directory().
|
private |
Definition at line 161 of file octave-qt-link.h.
Referenced by do_change_directory(), do_set_workspace(), octave_qt_link(), and update_directory().
|
private |
Definition at line 146 of file octave-qt-link.h.
Referenced by do_confirm_shutdown(), and shutdown_confirmation().
|
private |
Definition at line 158 of file octave-qt-link.h.
Referenced by octave_qt_link(), and terminal_interrupt().
|
protectedinherited |
Definition at line 371 of file octave-link.h.
Referenced by octave_link::set_workspace().
|
protectedinherited |
Definition at line 366 of file octave-link.h.
Referenced by octave_link::do_discard_events(), and octave_link::do_process_events().
|
protectedinherited |
Definition at line 369 of file octave-link.h.
Referenced by octave_link::do_discard_events(), and octave_link::do_process_events().
|
protectedinherited |
Definition at line 372 of file octave-link.h.
|
private |
Definition at line 156 of file octave-qt-link.h.
Referenced by octave_qt_link().
QMutex octave_qt_link::mutex |
Definition at line 138 of file octave-qt-link.h.
Referenced by main_window::confirm_shutdown_octave(), and do_confirm_shutdown().
QWaitCondition octave_qt_link::waitcondition |
Definition at line 139 of file octave-qt-link.h.
Referenced by main_window::confirm_shutdown_octave(), and do_confirm_shutdown().