#include "octave-qscintilla.h"
Public Types | |
enum | { ST_NONE = 0 , ST_LINE_COMMENT , ST_BLOCK_COMMENT } |
Public Slots | |
void | handle_enter_debug_mode (void) |
void | handle_exit_debug_mode (void) |
Signals | |
void | context_menu_break_condition_signal (int) |
void | context_menu_break_once (int) |
void | context_menu_edit_signal (const QString &) |
void | create_context_menu_signal (QMenu *) |
void | ctx_menu_run_finished_signal (bool, int, QTemporaryFile *, QTemporaryFile *, bool, bool) |
void | execute_command_in_terminal_signal (const QString &) |
void | focus_console_after_command_signal (void) |
void | interpreter_event (const fcn_callback &fcn) |
void | interpreter_event (const meth_callback &meth) |
void | qsci_has_focus_signal (bool) |
void | show_doc_signal (const QString &) |
void | status_update (bool, bool) |
void | update_rowcol_indicator_signal (int line, int col) |
Public Member Functions | |
octave_qscintilla (QWidget *p, base_qobject &oct_qobj) | |
~octave_qscintilla (void)=default | |
void | clear_selection_markers (void) |
QStringList | comment_string (bool comment=true) |
void | context_edit (void) |
void | context_help_doc (bool) |
void | context_run (void) |
virtual void | contextMenuEvent (QContextMenuEvent *e) |
QString | eol_string (void) |
bool | get_actual_word (void) |
void | get_current_position (int *pos, int *line, int *col) |
void | get_global_textcursor_pos (QPoint *global_pos, QPoint *local_pos) |
int | get_style (int pos=-1) |
int | is_style_comment (int pos=-1) |
void | replace_all (const QString &o_str, const QString &n_str, bool re, bool cs, bool wo) |
void | set_selection_marker_color (const QColor &c) |
void | set_word_selection (const QString &word=QString()) |
virtual void | setCursorPosition (int line, int col) |
void | show_selection_markers (int l1, int c1, int l2, int c2) |
void | smart_indent (bool do_smart_indent, int do_auto_close, int line, int ind_char_width) |
void | smart_indent_line_or_selected_text (int lineFrom, int lineTo) |
Protected Member Functions | |
void | dragEnterEvent (QDragEnterEvent *e) |
bool | event (QEvent *e) |
void | focusInEvent (QFocusEvent *focusEvent) |
void | keyPressEvent (QKeyEvent *e) |
void | show_replace_action_tooltip (void) |
Private Slots | |
void | contextmenu_break_condition (bool) |
void | contextmenu_break_once (const QPoint &) |
void | contextmenu_doc (bool) |
void | contextmenu_edit (bool) |
void | contextmenu_help (bool) |
void | contextmenu_help_doc (bool) |
void | contextmenu_run (bool) |
void | contextmenu_run_temp_error (void) |
void | ctx_menu_run_finished (bool, int, QTemporaryFile *, QTemporaryFile *, bool, bool) |
void | cursor_position_changed (int, int) |
void | text_changed (void) |
Private Member Functions | |
void | auto_close (int auto_endif, int l, const QString &line, QString &first_word) |
Private Attributes | |
bool | m_debug_mode |
int | m_indicator_id |
base_qobject & | m_octave_qobj |
QString | m_selection |
int | m_selection_col |
int | m_selection_line |
QString | m_selection_replacement |
QString | m_word_at_cursor |
Definition at line 43 of file octave-qscintilla.h.
anonymous enum |
Enumerator | |
---|---|
ST_NONE | |
ST_LINE_COMMENT | |
ST_BLOCK_COMMENT |
Definition at line 53 of file octave-qscintilla.h.
octave_qscintilla::octave_qscintilla | ( | QWidget * | p, |
base_qobject & | oct_qobj | ||
) |
Definition at line 113 of file octave-qscintilla.cc.
References CTRL, ctx_menu_run_finished(), ctx_menu_run_finished_signal(), cursor_position_changed(), m_indicator_id, marker::selection, status_update(), and text_changed().
|
default |
|
private |
Definition at line 1271 of file octave-qscintilla.cc.
References is_end().
Referenced by smart_indent().
void octave_qscintilla::clear_selection_markers | ( | void | ) |
Definition at line 384 of file octave-qscintilla.cc.
References m_indicator_id, and marker::selection.
Referenced by find_dialog::find(), file_editor_tab::handle_double_click(), and set_word_selection().
QStringList octave_qscintilla::comment_string | ( | bool | comment = true | ) |
Definition at line 420 of file octave-qscintilla.cc.
References gui_pref::def, ed_comment_str(), ed_comment_str_old(), ed_comment_strings, ed_comment_strings_count, ed_uncomment_str(), base_qobject::get_resource_manager(), resource_manager::get_settings(), gui_pref::key, and m_octave_qobj.
Referenced by file_editor_tab::do_comment_selected_text(), and file_editor_tab::handle_char_added().
void octave_qscintilla::context_edit | ( | void | ) |
Definition at line 343 of file octave-qscintilla.cc.
References contextmenu_edit(), and get_actual_word().
Referenced by file_editor_tab::context_edit().
void octave_qscintilla::context_help_doc | ( | bool | documentation | ) |
Definition at line 805 of file octave-qscintilla.cc.
References contextmenu_help_doc(), and get_actual_word().
Referenced by file_editor_tab::context_help().
|
signal |
Referenced by file_editor_tab::file_editor_tab(), and contextmenu_break_condition().
|
signal |
Referenced by contextmenu_break_once().
|
signal |
Referenced by file_editor_tab::file_editor_tab(), and contextmenu_edit().
void octave_qscintilla::context_run | ( | void | ) |
Definition at line 350 of file octave-qscintilla.cc.
References contextmenu_run(), command_editor::erase_empty_line(), and interpreter_event().
Referenced by file_editor_tab::context_run().
|
privateslot |
Definition at line 1068 of file octave-qscintilla.cc.
References context_menu_break_condition_signal().
Referenced by contextMenuEvent().
|
privateslot |
Definition at line 1082 of file octave-qscintilla.cc.
References context_menu_break_once().
|
privateslot |
Definition at line 800 of file octave-qscintilla.cc.
References contextmenu_help_doc().
Referenced by contextMenuEvent().
|
privateslot |
Definition at line 811 of file octave-qscintilla.cc.
References context_menu_edit_signal(), and m_word_at_cursor.
Referenced by context_edit(), and contextMenuEvent().
|
privateslot |
Definition at line 795 of file octave-qscintilla.cc.
References contextmenu_help_doc().
Referenced by contextMenuEvent().
|
privateslot |
Definition at line 334 of file octave-qscintilla.cc.
References execute_command_in_terminal_signal(), m_octave_qobj, m_word_at_cursor, and base_qobject::show_documentation_window().
Referenced by context_help_doc(), contextmenu_doc(), and contextmenu_help().
|
privateslot |
Definition at line 825 of file octave-qscintilla.cc.
References command_editor::accept_line(), contextmenu_run_temp_error(), resource_manager::create_tmp_file(), ctx_menu_run_finished_signal(), ed_show_dbg_file(), command_editor::erase_empty_line(), Fhistory(), Fisdebugmode(), Utils::fromStdString(), command_editor::get_current_line(), base_qobject::get_resource_manager(), resource_manager::get_settings(), interpreter_event(), command_editor::interrupt_event_loop(), gui_pref::key, m_octave_qobj, octave_stdout, ovl(), command_editor::redisplay(), command_editor::replace_line(), command_editor::set_initial_input(), and interpreter::source_file().
Referenced by context_run().
|
privateslot |
Definition at line 816 of file octave-qscintilla.cc.
Referenced by contextmenu_run().
|
virtual |
Definition at line 251 of file octave-qscintilla.cc.
References contextmenu_break_condition(), contextmenu_doc(), contextmenu_edit(), contextmenu_help(), create_context_menu_signal(), get_global_textcursor_pos(), lexer, and m_word_at_cursor.
|
signal |
Referenced by contextMenuEvent(), and file_editor::make_file_editor_tab().
|
privateslot |
Definition at line 1040 of file octave-qscintilla.cc.
References ed_show_dbg_file(), focus_console_after_command_signal(), base_qobject::get_resource_manager(), resource_manager::get_settings(), interpreter_event(), gui_pref::key, m_octave_qobj, ovl(), and resource_manager::remove_tmp_file().
Referenced by octave_qscintilla().
|
signal |
Referenced by octave_qscintilla(), and contextmenu_run().
|
privateslot |
Definition at line 1096 of file octave-qscintilla.cc.
References m_selection, m_selection_col, m_selection_line, and set_word_selection().
Referenced by octave_qscintilla().
|
protected |
Definition at line 1355 of file octave-qscintilla.cc.
QString octave_qscintilla::eol_string | ( | void | ) |
Definition at line 394 of file octave-qscintilla.cc.
Referenced by file_editor_tab::do_save_file(), and replace_all().
|
protected |
Definition at line 1186 of file octave-qscintilla.cc.
References workspace_model::get_symbol_names(), workspace_model::get_symbol_values(), base_qobject::get_workspace_model(), m_debug_mode, and m_octave_qobj.
|
signal |
Referenced by contextmenu_help_doc(), and file_editor::make_file_editor_tab().
|
signal |
Referenced by ctx_menu_run_finished(), and file_editor::make_file_editor_tab().
|
protected |
Definition at line 1109 of file octave-qscintilla.cc.
References status_update().
bool octave_qscintilla::get_actual_word | ( | void | ) |
Definition at line 373 of file octave-qscintilla.cc.
References get_global_textcursor_pos(), lexer, and m_word_at_cursor.
Referenced by context_edit(), and context_help_doc().
void octave_qscintilla::get_current_position | ( | int * | pos, |
int * | line, | ||
int * | col | ||
) |
Definition at line 412 of file octave-qscintilla.cc.
Referenced by file_editor_tab::handle_char_added(), replace_all(), set_word_selection(), and show_replace_action_tooltip().
void octave_qscintilla::get_global_textcursor_pos | ( | QPoint * | global_pos, |
QPoint * | local_pos | ||
) |
Definition at line 362 of file octave-qscintilla.cc.
Referenced by contextMenuEvent(), get_actual_word(), and show_replace_action_tooltip().
int octave_qscintilla::get_style | ( | int | pos = -1 | ) |
Definition at line 485 of file octave-qscintilla.cc.
Referenced by is_style_comment().
|
slot |
Definition at line 1370 of file octave-qscintilla.cc.
References m_debug_mode.
Referenced by file_editor::make_file_editor_tab().
|
slot |
Definition at line 1375 of file octave-qscintilla.cc.
References m_debug_mode.
Referenced by file_editor::make_file_editor_tab().
|
signal |
Referenced by file_editor_tab::file_editor_tab(), context_run(), contextmenu_run(), and ctx_menu_run_finished().
|
signal |
int octave_qscintilla::is_style_comment | ( | int | pos = -1 | ) |
Definition at line 498 of file octave-qscintilla.cc.
References get_style(), ST_BLOCK_COMMENT, ST_LINE_COMMENT, and ST_NONE.
Referenced by file_editor_tab::handle_char_added().
|
protected |
Definition at line 1214 of file octave-qscintilla.cc.
References m_selection, m_selection_replacement, replace_all(), set_word_selection(), and show_replace_action_tooltip().
|
signal |
void octave_qscintilla::replace_all | ( | const QString & | o_str, |
const QString & | n_str, | ||
bool | re, | ||
bool | cs, | ||
bool | wo | ||
) |
Definition at line 1145 of file octave-qscintilla.cc.
References eol_string(), get_current_position(), and setCursorPosition().
Referenced by file_editor_tab::do_save_file(), and keyPressEvent().
void octave_qscintilla::set_selection_marker_color | ( | const QColor & | c | ) |
Definition at line 239 of file octave-qscintilla.cc.
References m_indicator_id, and marker::selection.
Referenced by file_editor_tab::update_lexer_settings().
void octave_qscintilla::set_word_selection | ( | const QString & | word = QString () | ) |
Definition at line 765 of file octave-qscintilla.cc.
References clear_selection_markers(), get_current_position(), m_selection, m_selection_col, m_selection_line, and m_selection_replacement.
Referenced by cursor_position_changed(), file_editor_tab::handle_double_click(), and keyPressEvent().
|
virtual |
Definition at line 233 of file octave-qscintilla.cc.
References update_rowcol_indicator_signal().
Referenced by file_editor_tab::goto_line(), file_editor_tab::handle_context_menu_edit(), file_editor_tab::handle_double_click(), file_editor_tab::load_file(), file_editor_tab::next_bookmark(), file_editor_tab::next_breakpoint(), file_editor_tab::previous_bookmark(), file_editor_tab::previous_breakpoint(), replace_all(), find_dialog::replace_all(), and smart_indent().
|
signal |
|
protected |
Definition at line 1116 of file octave-qscintilla.cc.
References get_current_position(), get_global_textcursor_pos(), m_selection, m_selection_col, m_selection_line, and m_selection_replacement.
Referenced by keyPressEvent().
void octave_qscintilla::show_selection_markers | ( | int | l1, |
int | c1, | ||
int | l2, | ||
int | c2 | ||
) |
Definition at line 787 of file octave-qscintilla.cc.
References m_indicator_id, and marker::selection.
Referenced by find_dialog::find(), and file_editor_tab::handle_double_click().
void octave_qscintilla::smart_indent | ( | bool | do_smart_indent, |
int | do_auto_close, | ||
int | line, | ||
int | ind_char_width | ||
) |
Definition at line 540 of file octave-qscintilla.cc.
References auto_close(), is_end(), and setCursorPosition().
Referenced by file_editor_tab::handle_cursor_moved().
void octave_qscintilla::smart_indent_line_or_selected_text | ( | int | lineFrom, |
int | lineTo | ||
) |
Definition at line 652 of file octave-qscintilla.cc.
Referenced by file_editor_tab::do_smart_indent_line_or_selected_text().
|
signal |
Referenced by octave_qscintilla(), focusInEvent(), file_editor::make_file_editor_tab(), and text_changed().
|
privateslot |
Definition at line 1091 of file octave-qscintilla.cc.
References status_update().
Referenced by octave_qscintilla().
|
signal |
Referenced by file_editor_tab::file_editor_tab(), and setCursorPosition().
|
private |
Definition at line 148 of file octave-qscintilla.h.
Referenced by event(), handle_enter_debug_mode(), and handle_exit_debug_mode().
|
private |
Definition at line 156 of file octave-qscintilla.h.
Referenced by octave_qscintilla(), clear_selection_markers(), set_selection_marker_color(), and show_selection_markers().
|
private |
Definition at line 146 of file octave-qscintilla.h.
Referenced by comment_string(), contextmenu_help_doc(), contextmenu_run(), ctx_menu_run_finished(), and event().
|
private |
Definition at line 152 of file octave-qscintilla.h.
Referenced by cursor_position_changed(), keyPressEvent(), set_word_selection(), and show_replace_action_tooltip().
|
private |
Definition at line 155 of file octave-qscintilla.h.
Referenced by cursor_position_changed(), set_word_selection(), and show_replace_action_tooltip().
|
private |
Definition at line 154 of file octave-qscintilla.h.
Referenced by cursor_position_changed(), set_word_selection(), and show_replace_action_tooltip().
|
private |
Definition at line 153 of file octave-qscintilla.h.
Referenced by keyPressEvent(), set_word_selection(), and show_replace_action_tooltip().
|
private |
Definition at line 150 of file octave-qscintilla.h.
Referenced by contextmenu_edit(), contextmenu_help_doc(), contextMenuEvent(), and get_actual_word().