GNU Octave  3.8.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Public Types | Public Slots | Signals | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes | List of all members
octave_qt_link Class Reference

#include "octave-qt-link.h"

Inheritance diagram for octave_qt_link:
Inheritance graph
[legend]
Collaboration diagram for octave_qt_link:
Collaboration graph
[legend]

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 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_debugger_signal (void)
void exit_signal (int status)
void insert_debugger_pointer_signal (const QString &, int)
void set_history_signal (const QStringList &hist)
void set_workspace_signal (bool top_level, 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 (void)
 ~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)
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 >, intdo_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, 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)

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 void connect_link (octave_link *)
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)
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)
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)

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_mutexevent_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_linkoperator= (const octave_qt_link &)

Private Attributes

octave_interpretercommand_interpreter
QThreadmain_thread

Detailed Description

Definition at line 50 of file octave-qt-link.h.

Member Typedef Documentation

typedef std::list<std::pair<std::string, std::string> > octave_link::filter_list
inherited

Definition at line 190 of file octave-link.h.

Constructor & Destructor Documentation

octave_qt_link::octave_qt_link ( void  )

Definition at line 46 of file octave-qt-link.cc.

References command_interpreter, execute_interpreter_signal(), and main_thread.

octave_qt_link::~octave_qt_link ( void  )

Definition at line 58 of file octave-qt-link.cc.

octave_qt_link::octave_qt_link ( const octave_qt_link )
private

Member Function Documentation

static void octave_link::append_history ( const std::string &  hist_entry)
inlinestaticinherited
void octave_qt_link::append_history_signal ( const QString &  hist_entry)
signal

Referenced by do_append_history().

static void octave_link::change_directory ( const std::string &  dir)
inlinestaticinherited

Definition at line 213 of file octave-link.h.

Referenced by octave_change_to_directory().

void octave_qt_link::change_directory_signal ( const QString &  dir)
signal

Referenced by do_change_directory().

static void octave_link::clear_history ( void  )
inlinestaticinherited

Definition at line 253 of file octave-link.h.

Referenced by do_history().

void octave_qt_link::clear_history_signal ( void  )
signal

Referenced by do_clear_history().

static void octave_link::clear_workspace ( void  )
inlinestaticinherited

Definition at line 235 of file octave-link.h.

Referenced by Fclear().

void octave_qt_link::clear_workspace_signal ( void  )
signal

Referenced by do_clear_workspace().

void octave_link::connect_link ( octave_link obj)
staticinherited

Definition at line 72 of file octave-link.cc.

References error(), and octave_link::instance.

Referenced by main_window::construct_octave_qt_link().

static int octave_link::debug_cd_or_addpath_error ( const std::string &  file,
const std::string &  dir,
bool  addpath_option 
)
inlinestaticinherited

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

Referenced by file_in_path().

void octave_qt_link::delete_debugger_pointer_signal ( const QString &  ,
int   
)
signal
static void octave_link::discard_events ( void  )
inlinestaticinherited

Definition at line 76 of file octave-link.h.

void octave_qt_link::do_append_history ( const std::string &  hist_entry)
virtual

Implements octave_link.

Definition at line 403 of file octave-qt-link.cc.

References append_history_signal().

void octave_qt_link::do_change_directory ( const std::string &  dir)
virtual

Implements octave_link.

Definition at line 348 of file octave-qt-link.cc.

References change_directory_signal().

void octave_qt_link::do_clear_history ( void  )
virtual

Implements octave_link.

Definition at line 409 of file octave-qt-link.cc.

References clear_history_signal().

void octave_qt_link::do_clear_workspace ( void  )
virtual

Implements octave_link.

Definition at line 386 of file octave-qt-link.cc.

References clear_workspace_signal().

int octave_qt_link::do_debug_cd_or_addpath_error ( const std::string &  file,
const std::string &  dir,
bool  addpath_option 
)
virtual
void octave_qt_link::do_delete_debugger_pointer ( const std::string &  file,
int  line 
)
private

Definition at line 469 of file octave-qt-link.cc.

References delete_debugger_pointer_signal().

Referenced by do_execute_in_debugger_event().

void octave_link::do_discard_events ( void  )
protectedinherited
bool octave_qt_link::do_edit_file ( const std::string &  file)
virtual

Implements octave_link.

Definition at line 75 of file octave-qt-link.cc.

References edit_file_signal().

void octave_qt_link::do_enter_debugger_event ( const std::string &  file,
int  line 
)
virtual

Implements octave_link.

Definition at line 425 of file octave-qt-link.cc.

References do_insert_debugger_pointer(), and enter_debugger_signal().

void octave_link::do_entered_readline_hook ( void  )
inlineprotectedinherited

Definition at line 388 of file octave-link.h.

void octave_qt_link::do_execute_command_in_terminal ( const std::string &  command)
virtual

Implements octave_link.

Definition at line 354 of file octave-qt-link.cc.

References execute_command_in_terminal_signal().

void octave_qt_link::do_execute_in_debugger_event ( const std::string &  file,
int  line 
)
virtual

Implements octave_link.

Definition at line 433 of file octave-qt-link.cc.

References do_delete_debugger_pointer().

bool octave_qt_link::do_exit ( int  status)
virtual

Implements octave_link.

Definition at line 67 of file octave-qt-link.cc.

References exit_signal().

void octave_qt_link::do_exit_debugger_event ( void  )
virtual

Implements octave_link.

Definition at line 439 of file octave-qt-link.cc.

References exit_debugger_signal().

std::list< std::string > octave_qt_link::do_file_dialog ( const filter_list filter,
const std::string &  title,
const std::string &  filename,
const std::string &  pathname,
const std::string &  multimode 
)
virtual
void octave_link::do_finished_readline_hook ( void  )
inlineprotectedinherited

Definition at line 389 of file octave-link.h.

void octave_link::do_generate_events ( void  )
protectedinherited

Definition at line 81 of file octave-link.cc.

std::list< std::string > octave_qt_link::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 
)
virtual
void octave_qt_link::do_insert_debugger_pointer ( const std::string &  file,
int  line 
)
private

Definition at line 463 of file octave-qt-link.cc.

References insert_debugger_pointer_signal().

Referenced by do_enter_debugger_event().

std::pair< std::list< int >, int > octave_qt_link::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 
)
virtual
int octave_qt_link::do_message_dialog ( const std::string &  dlg,
const std::string &  msg,
const std::string &  title 
)
virtual
template<class T >
void octave_link::do_post_event ( T *  obj,
void(T::*)(void method 
)
inlineprotectedinherited

Definition at line 371 of file octave-link.h.

References action_container::add_method().

template<class T , class A >
void octave_link::do_post_event ( T *  obj,
void(T::*)(A method,
A  arg 
)
inlineprotectedinherited

Definition at line 377 of file octave-link.h.

References action_container::add_method().

template<class T , class A >
void octave_link::do_post_event ( T *  obj,
void(T::*)(const A &)  method,
const A arg 
)
inlineprotectedinherited

Definition at line 383 of file octave-link.h.

References action_container::add_method().

void octave_qt_link::do_post_input_event ( void  )
virtual

Implements octave_link.

Definition at line 420 of file octave-qt-link.cc.

void octave_qt_link::do_pre_input_event ( void  )
virtual

Implements octave_link.

Definition at line 415 of file octave-qt-link.cc.

void octave_link::do_process_events ( void  )
protectedinherited
bool octave_qt_link::do_prompt_new_edit_file ( const std::string &  file)
virtual
std::string octave_qt_link::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 
)
virtual
void octave_qt_link::do_set_default_prompts ( std::string &  ps1,
std::string &  ps2,
std::string &  ps4 
)
virtual

Implements octave_link.

Definition at line 453 of file octave-qt-link.cc.

void octave_qt_link::do_set_history ( const string_vector hist)
virtual

Implements octave_link.

Definition at line 392 of file octave-qt-link.cc.

References Array< T >::length(), and set_history_signal().

void octave_qt_link::do_set_workspace ( bool  top_level,
const std::list< workspace_element > &  ws 
)
virtual

Implements octave_link.

Definition at line 360 of file octave-qt-link.cc.

References set_workspace_signal().

void octave_qt_link::do_show_doc ( const std::string &  file)
virtual

Implements octave_link.

Definition at line 546 of file octave-qt-link.cc.

References show_doc_signal().

void octave_qt_link::do_show_preferences ( void  )
virtual

Implements octave_link.

Definition at line 540 of file octave-qt-link.cc.

References show_preferences_signal().

void octave_qt_link::do_update_breakpoint ( bool  insert,
const std::string &  file,
int  line 
)
virtual

Implements octave_link.

Definition at line 445 of file octave-qt-link.cc.

References update_breakpoint_marker_signal().

static bool octave_link::edit_file ( const std::string &  file)
inlinestaticinherited

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

Referenced by F__octave_link_edit_file__().

void octave_qt_link::edit_file_signal ( const QString &  file)
signal

Referenced by do_edit_file().

static bool octave_link::enabled ( void  )
inlinestaticinherited

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

Referenced by F__octave_link_enabled__(), and octave_link::set_workspace().

static void octave_link::enter_debugger_event ( const std::string &  file,
int  line 
)
inlinestaticinherited

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

Referenced by get_debug_input().

void octave_qt_link::enter_debugger_signal ( void  )
signal

Referenced by do_enter_debugger_event().

static void octave_link::entered_readline_hook ( void  )
inlinestaticinherited

Definition at line 121 of file octave-link.h.

Referenced by octave_readline_hook().

static void octave_link::execute_command_in_terminal ( const std::string &  command)
inlinestaticinherited

Definition at line 220 of file octave-link.h.

void octave_qt_link::execute_command_in_terminal_signal ( const QString &  command)
signal
static void octave_link::execute_in_debugger_event ( const std::string &  file,
int  line 
)
inlinestaticinherited

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

Referenced by execute_in_debugger_handler().

void octave_qt_link::execute_interpreter ( void  )

Definition at line 61 of file octave-qt-link.cc.

References execute_interpreter_signal().

Referenced by main_window::construct_octave_qt_link().

void octave_qt_link::execute_interpreter_signal ( void  )
signal
static bool octave_link::exit ( int  status)
inlinestaticinherited

Definition at line 82 of file octave-link.h.

Referenced by clean_up_and_exit().

static void octave_link::exit_debugger_event ( void  )
inlinestaticinherited

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

Referenced by octave_base_reader::octave_gets().

void octave_qt_link::exit_debugger_signal ( void  )
signal

Referenced by do_exit_debugger_event().

void octave_qt_link::exit_signal ( int  status)
signal

Referenced by do_exit().

static std::list<std::string> octave_link::file_dialog ( const filter_list filter,
const std::string &  title,
const std::string &  filename,
const std::string &  dirname,
const std::string &  multimode 
)
inlinestaticinherited

Definition at line 193 of file octave-link.h.

Referenced by F__octave_link_file_dialog__().

bool octave_qt_link::file_in_path ( const std::string &  file,
const std::string &  dir 
)
static
static void octave_link::finished_readline_hook ( void  )
inlinestaticinherited

Definition at line 127 of file octave-link.h.

Referenced by octave_readline_hook().

static void octave_link::generate_events ( void  )
inlinestaticinherited

Definition at line 56 of file octave-link.h.

Referenced by octave_readline_hook().

static std::list<std::string> octave_link::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 
)
inlinestaticinherited

Definition at line 179 of file octave-link.h.

Referenced by F__octave_link_input_dialog__().

void octave_qt_link::insert_debugger_pointer_signal ( const QString &  ,
int   
)
signal
static std::pair<std::list<int>, int> octave_link::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 
)
inlinestaticinherited

Definition at line 162 of file octave-link.h.

Referenced by F__octave_link_list_dialog__().

static int octave_link::message_dialog ( const std::string &  dlg,
const std::string &  msg,
const std::string &  title 
)
inlinestaticinherited

Definition at line 146 of file octave-link.h.

Referenced by F__octave_link_message_dialog__().

octave_qt_link& octave_qt_link::operator= ( const octave_qt_link )
private
template<class T >
static void octave_link::post_event ( T *  obj,
void(T::*)(void method 
)
inlinestaticinherited
template<class T , class A >
static void octave_link::post_event ( T *  obj,
void(T::*)(A method,
A  arg 
)
inlinestaticinherited

Definition at line 100 of file octave-link.h.

template<class T , class A >
static void octave_link::post_event ( T *  obj,
void(T::*)(const A &)  method,
const A arg 
)
inlinestaticinherited

Definition at line 107 of file octave-link.h.

template<class T , class A , class B >
static void octave_link::post_event ( T *  obj,
void(T::*)(const A &, const B &)  method,
const A arg_a,
const B arg_b 
)
inlinestaticinherited

Definition at line 114 of file octave-link.h.

static void octave_link::post_input_event ( void  )
inlinestaticinherited

Definition at line 265 of file octave-link.h.

Referenced by octave_base_reader::octave_gets().

static void octave_link::pre_input_event ( void  )
inlinestaticinherited

Definition at line 259 of file octave-link.h.

Referenced by octave_base_reader::octave_gets().

static void octave_link::process_events ( bool  disable = false)
inlinestaticinherited

Definition at line 65 of file octave-link.h.

Referenced by do_octave_atexit(), and octave_readline_hook().

static bool octave_link::prompt_new_edit_file ( const std::string &  file)
inlinestaticinherited

Definition at line 140 of file octave-link.h.

Referenced by F__octave_link_edit_file__().

static std::string octave_link::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 
)
inlinestaticinherited

Definition at line 153 of file octave-link.h.

Referenced by F__octave_link_question_dialog__().

static void octave_link::set_default_prompts ( std::string &  ps1,
std::string &  ps2,
std::string &  ps4 
)
inlinestaticinherited

Definition at line 306 of file octave-link.h.

Referenced by set_default_prompts().

static void octave_link::set_history ( const string_vector hist)
inlinestaticinherited

Definition at line 241 of file octave-link.h.

Referenced by do_history(), and initialize_history().

void octave_qt_link::set_history_signal ( const QStringList &  hist)
signal

Referenced by do_set_history().

void octave_link::set_workspace ( void  )
staticinherited
static void octave_link::set_workspace ( bool  top_level,
const std::list< workspace_element > &  ws 
)
inlinestaticinherited

Definition at line 228 of file octave-link.h.

void octave_qt_link::set_workspace_signal ( bool  top_level,
const QString &  scopes,
const QStringList &  symbols,
const QStringList &  class_names,
const QStringList &  dimensions,
const QStringList &  values,
const QIntList complex_flags 
)
signal

Referenced by do_set_workspace().

static bool octave_link::show_doc ( const std::string &  file)
inlinestaticinherited

Definition at line 331 of file octave-link.h.

Referenced by F__octave_link_show_doc__().

void octave_qt_link::show_doc_signal ( const QString &  file)
signal

Referenced by do_show_doc().

static bool octave_link::show_preferences ( )
inlinestaticinherited

Definition at line 319 of file octave-link.h.

Referenced by F__octave_link_show_preferences__().

void octave_qt_link::show_preferences_signal ( void  )
signal

Referenced by do_show_preferences().

void octave_qt_link::terminal_interrupt ( void  )
slot

Definition at line 552 of file octave-qt-link.cc.

References command_interpreter, and octave_interpreter::interrupt().

static void octave_link::update_breakpoint ( bool  insert,
const std::string &  file,
int  line 
)
inlinestaticinherited
void octave_qt_link::update_breakpoint_marker_signal ( bool  insert,
const QString &  file,
int  line 
)
signal

Referenced by do_update_breakpoint().

Member Data Documentation

octave_interpreter* octave_qt_link::command_interpreter
private

Definition at line 147 of file octave-qt-link.h.

Referenced by octave_qt_link(), and terminal_interrupt().

bool octave_link::debugging
protectedinherited

Definition at line 363 of file octave-link.h.

octave_mutex* octave_link::event_queue_mutex
protectedinherited
event_queue octave_link::gui_event_queue
protectedinherited
bool octave_link::link_enabled
protectedinherited

Definition at line 364 of file octave-link.h.

QThread* octave_qt_link::main_thread
private

Definition at line 145 of file octave-qt-link.h.

Referenced by octave_qt_link().


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